#1 : 22/05-25 17:33 Gerhard
Posts: 3
|
Hello,
I'm new to Advanced Renamer. Looks like a great tool for renaming e.g. photo files. I use the copy and then rename feature. Everything looks fine except that the timestamp is not exact the same. Script to verify the timestamp: powershell Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser $fileorig = Get-Item .\DSC06560.ARW $fileorig.LastWriteTimeUtc.ToString("o") $filecopied = Get-Item .\2025-05-17-21.03.19-DSC06560.ARW $filecopied.LastWriteTimeUtc.ToString("o") 2025-05-17T19:03:19.4900000Z 2025-05-17T19:03:20.0000000Z Environment is Windows 10. Can you please fix it. Thnx. Gerhard |
#2 : 12/06-25 13:24 Styb
Posts: 183
|
Reply to #1:
It's the same in Windows 11, the modified date of the copied files is plus one or two seconds. |
#3 : 12/06-25 14:11 Kim Jensen
Administrator
Posts: 990 |
Reply to #1:
If you copy the files with Advanced Renamer, the program will not make any changes to the timestamp. I would guess the modified timestamp of the new file would be the time of when the copy operation ended. The program only instructs Windows to copy the file. How Windows chooses to set the timestamp of the new file is up to Windows. |
#4 : 16/06-25 15:01 Gerhard
Posts: 3
|
Reply to #3:
Hello Kim, I never had such an issue by copying files under Windows and had a wrong timestamp. e.g. when you use the command line "copy a.jpg b.jpg" the relevant timestamps are exactly the same. When a file is copied it might also be the actual timestamp but not the typical much older timestamp plus 1 or 2 seconds. So there must be something different in how you copy the files. Which "System Call" do you use? Do you use an abstraction layer (Windows + Mac) for copying? Maybe that one is broken. You can also set the timestamp after the copy operation manually if the copying is broken. Thnx. Ciao, Gerhard |
#5 : 18/06-25 11:45 Kim Jensen
Administrator
Posts: 990 |
Reply to #4:
I was about to dismiss this issue, and call it quirkiness of Windows. The internet is full of similar stories when using Windows Explorer. But then I decided to investigate further, and it turns out you are right. When copying, the system is instructed to preserve the timestamps. But for some reason, the modified timestamp is off by as much as a couple of seconds. To me it looks like it is off by the time it takes to copy the file. If it takes 2 seconds to copy the file, the timestamp will also be off by 2 seconds. This is just weird, and I don't know why it behaves like this. I have found a fix, that seems to work. I will roll it out in version 4.13, expected release next week. macOS doesn't seem to be affected by this. |
#6 : 19/06-25 15:46 Gerhard
Posts: 3
|
Reply to #5:
Great, thnx for the fix. Can you be more specific about the technical reason and the technical fix? Thnx. Ciao, Gerhard |