1. Can copy_file function creates preserve timestamp?

I am trying copy_file function using following simple command:

copy_file("srcfile", "dstfile")

It copies but puts new date and time stamp to the newly created file.

How can I make this function preserve the date and time stamp of original file to the new copy? I could not find any option in this function or any other method in the manual. Thanks for your help.

new topic     » topic index » view message » categorize

2. Re: Can copy_file function creates preserve timestamp?

No, the time stamp is put there by the OS.

If you are using Linux, you can use touch -r <old> <new>

Found on net for Windows, using PowerShell (not tested)

PS C:\mytest> (Get-Item "C:\mytest\myfolder1").CreationTime=("08 March 2016 18:00:00")

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu