Save text file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to be able to save a text file in the following manner:

copy c:\sales.txt c:\archive\sales_mmddyyyy_hhmmss.txt

Notice that I need to grab the system date and time and include it as part
of the file name. Any suggestions? Thanks.
 
i would use the filesystemobject.
try somthing like this:

FileSystemObject.CopyFile "c:\sales.txt", "c:\archive\sales_" &
Format(Now(), "mmddyyyy_hhmmss")

Good Luck!
 
Back
Top