'Rename Files using first 4 characters of name
Set FileObject = CreateObject("Scripting.FileSystemObject")
Set SourceFolder = FileObject.GetFolder("C:\AP REGISTER\test\")
Set TargetFolder = FileObject.GetFolder("C:\AP REGISTER\test\archive\")
Set FileCollection = SourceFolder.Files
'Get the list of files
For each file in FileCollection
File.name = Left(File.name,4) + ".tif"
Next
I get file already exists error.
Thanks for the help
Set FileObject = CreateObject("Scripting.FileSystemObject")
Set SourceFolder = FileObject.GetFolder("C:\AP REGISTER\test\")
Set TargetFolder = FileObject.GetFolder("C:\AP REGISTER\test\archive\")
Set FileCollection = SourceFolder.Files
'Get the list of files
For each file in FileCollection
File.name = Left(File.name,4) + ".tif"
Next
I get file already exists error.
Thanks for the help