hello sir ,
i have a code to replace the extension but i want to add extension(.log) to those files without any extension
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myFiles As String()
myFiles = IO.Directory.GetFiles("D:\EXTENSIONFILE\", "*.txt")
Dim newFilePath As String
For Each filepath As String In myFiles
newFilePath = filepath.Replace(".txt", ".log")
System.IO.File.Move(filepath, newFilePath)
Next
End Sub