CMD file time not always matching windows explorer file time

Posted by skyrail on Super User See other posts from Super User or by skyrail
Published on 2014-06-01T10:17:02Z Indexed on 2014/06/01 15:33 UTC
Read the original article Hit count: 216

Filed under:
|
|
|

I have a set of file I need to set the created, modified and last access date to exif date taken value, after a copy between 2 folders (might be fat32 on memory card or ntfs on fixed or usb disk). When I copy a file, the date and time switch to the current date. Then I change all 3 dates manually, either with change attributes in windows explorer or far manager on the command line. To make it faster I wrote a batch script getting original file dates (with php and function stat), building a batch script that invoke nircmd setfiletime for each file. Then I apply this batch to the copied version.

The operation is relatively fast and reliable. Unfortunately, a bunch of files have last access and created time different in cmd and windows explorer (1H difference). Very strangely, it happens with dates between november and february, which make the operation unreliable. Why is this happening, and how can I fix it?

© Super User or respective owner

Related posts about windows-explorer

Related posts about file