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

windowswindows 7

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.

Best 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")