Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy file & change modifed date

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Hello all. I am copying a file from one directory to another. I am using the .Move method of the FileScriptingObject. It works fine, but I would like to change the "last modified" date so I can sort the files in Explorer. Is there a way to do this?

Is the only way to do this is by creating a new file on the new directory and then copy in the data one line at a time? It seems like a backward approach of doing this, but if it's the only way, could someone post the code, if it's handy?

Thanks,

Steve S
sms@hmbnet.com
 
Try to use
CopyFile - FileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\"
CopyFolder - FileSystemObject.CopyFolder "c:\mydocuments\letters\*", "c:\tempfolder\"
DeleteFolder - to delete the folder...
If this does'n work please tell me ... ________

George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top