Jump to content


Photo

FileSetTime fails on samba network folders/drives


  • Please log in to reply
No replies to this topic

#1 HackintoshHD

HackintoshHD
  • Members
  • 1 posts

Posted 21 May 2012 - 10:53 PM

I have a file which has been copied once. Due to Windows' IMHO strange handling of a file's creation vs. modification times, the creation time of the copy is newer than its modification time. As I am not really interested in knowing when I created the copy, I wanted to automatically set the copy's creation time back to (at least) its modification time.

I do this within an AutoHotkey script using a loop and the code

FileSetTime, %ModificationTime%, %LongPath%, C, 1

This works nicely on local files.

Within a Samba network folder of a Synology DiskStation, however, the creation time is not set equal to the modification time by this line of code, but to the current time instead it seems. I don't know why this happens, but it happens no matter whether I map the particular folder as a drive or not. Other Windows Explorer extensions like Ninotech's Date Edit are nonetheless able to modify creation and/or modification dates of files stored in the samba network folder, so I guess it's not a general problem with Samba.

Can anybody reproduce this? Is there perhaps a solution to my problem?

- Thanks a lot for any help!