# Why is Windows calling one of the files “newer” while their timestamps are the same?

When Windows is presenting this dialog, how does it compare which of those two modified dates is "newer?"

At first, I thought Windows was comparing the Date Created attribute and using the result of this comparison to label one or the other "(newer)." (If a file was copied in to a particular location, it may have the creation date of when the copy happened, rather than the original creation date of the file.) However, reproducing it with another file, the result of which is "newer" seems to be the opposite:

It is shown for either Copy or Move:

And for background, the file in test2 is a previously made copy of the file in test1.

• What is the file system type on drive E:? FAT32? NTFS? Is it a network drive? – Peter Mortensen Feb 12 '17 at 12:14
• E: and C: (where the "older" file had been copied to and back) are both NTFS. – WBT Feb 12 '17 at 18:52

## 1 Answer

Timestamps in the NTFS file system have a resolution of 100 nanoseconds (0.0000001 s). Even if the properties dialog shows the same rounded value, it could still be that the files were created e.g. within tenths of a second from each other.

(Most file systems measure times in μs or ns. FAT32 is a bit of a relic and rounds timestamps to 2 seconds.)

Try one of the following methods to compare the full timestamps:

wmic datafile where name="c:\\foo\\bar.txt" get lastmodified


PowerShell:

(Get-ChildItem c:\foo\bar.txt).LastWriteTime.ToString("o")

• Remember, the file in test1 was created by copying the file from test2. – WBT Feb 11 '17 at 20:22
• In that case could you verify that the timestamps are in fact identical? – grawity Feb 11 '17 at 20:25
• Meta discussion on rejected edit – WBT Feb 11 '17 at 21:07
• This does seem to be the answer; eventual acceptance is likely. One gives a LastModified of "20170115002742.000000-300" and the other gives a LastModified of "20170115002742.160883-300." In additional testing, it seems that some copy operations obliterate the fractional second information. – WBT Feb 11 '17 at 21:12
• It is even worse than that. FAT32 stores file times as local time, which makes for all sorts of pain and sorrow. Also, while modification time has a resolution of 2 seconds, creation time has a resolution of 10 seconds, and access time has a resolution of 1 day! – Cody Gray Feb 12 '17 at 7:26