Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi NG
Im trying to rename/move all files in a directory using Sub nytfors() Set fs = Application.FileSearch With fs .LookIn = "C:\tb" .Filename = "*.jpg" End With For i = 1 To fs.FoundFiles.Count OldName = "C:\tb\" & fs.FoundFiles(i) NewName = "C:\tb2\u" & i 'Debug.Print OldName, NewName Name OldName As NewName Next i End Sub but the code stops at Name OldName As NewName telling me its an invalid procedure call or argument. Any ideas? Jan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Renaming Files | Excel Discussion (Misc queries) | |||
Maintain cell links when renaming directory containing multiple f | Excel Worksheet Functions | |||
Check if directory empty OR no of files in directory. | Excel Programming | |||
Renaming files | Excel Programming | |||
Renaming Files | Excel Programming |