Are you saying you have something like existing filenames in column A and
new filenames corresponding in column B and you want something to rename
each entry in A to the name in B?
That is exactly what I mean - do you know how to do this?
That is exactly what I mean - do you know how to do this?
Also it would be usefull to be able to read the original list of filenames into a column in Excel, but I don't know if this is possible either. Maybe they can be copied to the clipboard somehow and then pasted in?
To pull in a directory list:
#substitute the ListDir variable and *.xls as appropriate
Sub DirList()
Const ListDir = "C:\Data\"
If Not Dir(ListDir & "*.xls") = "" Then
FList = Dir(ListDir & "*.xls")
R=1
Do Until FList = ""
Cells(R,1).Value = ListDir & FList
R = R + 1
Flist = Dir
Loop
End If
End Sub
If you have filenames in Col A that need to be changed to Col B:
Sub RenameFiles()
For I = 1 to Range("A1").End(xlDown).Row
OldFileName = Cells(R,1).Value
NewFileName = Cells(R,2).Value
If Not Dir(OldFileName) = "" Then Name OldFileName as NewFileName
Next
End Sub