参考代码
Dim path As String = "d:\"Dim hz1 As String = ".jpg"Dim hz2 As String = ".abc"For Each file As String In FileSys.GetFiles(path) If file.EndsWith(hz1) Then FileSys.RenameFile(file, FileSys.GetName(file).Replace(hz1, hz2)) End IfNext