Windows – Why does File Copy from NTFS To FAT32 Change a File’s Modified Date

windows

When copying a file from an NTFS partition to a FAT32 device, the new file's modified date is sometimes changed by 1 or 2 seconds. Why does this happen?

This became apparent in a file syncronization program I have that compares mod dates and copies newer files over the older, and in this case can never catch up since the mod date is a moving target. I tried doing a drag-n-drop copy within Windows Explorer and it did the same thing.

Best Answer

This is because FAT32 has 2 second resolution for last write times.

In other words, what you're seeing is a limitation of the file system: it can't store last modified times accurately to the second.

Your synchronisation program is going to have to allow a window of a few seconds when comparing dates or use another method to work out which files to copy. You could checksum the files to compare the contents; if you don't have too many files this can be reasonably fast.