For renaming files in a folder in series, use the following code
Code:Sub Renamer() Const strPath As String = "C:\Path Of Folder\" Dim strFile As String Dim lngLoop As Long lngLoop = 1 strFile = Dir(strPath) Do While strFile <> "" Name strPath & strFile As strPath & "ANYPREFIX" & Format(lngLoop, "0000") & Right(strFile, Len(strFile) - InStrRev(strFile, ".") + 1) lngLoop = lngLoop + 1 strFile = Dir Loop End Sub
Bookmarks