1. Can copy_file function creates preserve timestamp?
- Posted by rneu Jun 24, 2017
- 1162 views
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.
2. Re: Can copy_file function creates preserve timestamp?
- Posted by irv Jun 24, 2017
- 1157 views
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")