I am fairly new to VBScript and I am trying to write a script that will copy a file (AUTO.MON) to a specified folder and rename it (ASPLAY040317.txt) The 040317 part of the title would be for the file copied over on March 17, 2004. The code that I have is this.
This, however, thinks that I am trying to tell it to go to a folder that it can't find.
How do I tell it to rename the file once it is copied??
Thanks, Caleb
Code:
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "Z:\Dad\ASPLAY\AUTO.MON", "C:\ASPLAY" &
Now() & ".txt"
This, however, thinks that I am trying to tell it to go to a folder that it can't find.
How do I tell it to rename the file once it is copied??
Thanks, Caleb