VB script to select folder to open each excel file and then rename and save them into another folder then close each file. (files are read only templates that need updating)
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject
")
Dim strCurrentFolder
strCurrentFolder = "c:\source folder"
Dim objFolder
Set objFolder = objFSO.GetFolder (strCurrentFolder)
ListDirectory objFolder
Sub ListDirectory(objFolder)
Dim objFile
Dim objSubFolder
For Each objFile In objFolder.Files
If UCase(Right(objFile.Path, 3)) = "XLS" Then
objFSO.MoveFile objFile.Path, strcurrentfolder & NewFileName
wscript.quit
End If
Next
End Sub
this script moves and renames the files but I want to keep the original files. Trying to modify this script to do what posted at the top of this post though.