I am trying to write a script that will do several things one of which is rename some files with the original name plus the date and time. I have looked at other posts on how to do this and believe my code to be exactly the same as some of those. I keep getting an error, "path not found" whenever I try to run the code. I have pasted the affected code below. I took it out of the bigger script trying to debug it.
Any help whatsoever will be greatly appreciated.
' VBScript source code
Dim FSO
Set FSO = CreateObject ("Scripting.FileSystemObject"
Set Folder = FSO.GetFolder("D:\Billing Collections\Recent"
ADATE = FormatDateTime(Now, VbShortDate) & ".pdf"
'
For Each File In Folder.Files
'If Len (File.Name) = 12 Then
FSO.MoveFile "D:\Billing Collections\Recent\" & (File.Name), "D:\Billing Collections\Recent\" & left(File.Name,6) & ADATE
Next
Any help whatsoever will be greatly appreciated.
' VBScript source code
Dim FSO
Set FSO = CreateObject ("Scripting.FileSystemObject"
Set Folder = FSO.GetFolder("D:\Billing Collections\Recent"
ADATE = FormatDateTime(Now, VbShortDate) & ".pdf"
'
For Each File In Folder.Files
'If Len (File.Name) = 12 Then
FSO.MoveFile "D:\Billing Collections\Recent\" & (File.Name), "D:\Billing Collections\Recent\" & left(File.Name,6) & ADATE
Next