copy /uf and usb key

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
I don't understand what is happening with copy /uf. My c: drive is an ntfs hard disk. My f: drive is a FAT USB key. I copy a file from c: to f:, then copy /uf it back. I would expect that it wouldn't be copied back, but it is.

Code:
C:\Junk>echo %@filetime[Foo.bar,,s] %@fileage[foo.bar]
20:37:39 129745030598204083
 
C:\Junk>copy Foo.bar f:\
C:\Junk\Foo.bar => F:\Foo.bar
    1 file copied
 
C:\Junk>echo %@filetime[f:\Foo.bar,,s] %@fileage[f:\foo.bar]
20:37:40 129745030600000000
 
C:\Junk>copy /uf f:\Foo.bar .
F:\Foo.bar => C:\Junk\Foo.bar
    1 file copied
 
C:\Junk>echo %@filetime[Foo.bar,,s] %@fileage[foo.bar]
20:37:40 129745030600000000
 
C:\Junk>ver

TCC  13.03.45   Windows Vista [Version 6.0.6002]
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,383
39
Albuquerque, NM
prospero.unm.edu
#2
FAT only has a granularity of two seconds for file update times, whereas NTFS file times are much more accurate (sub-millisecond), therefore you will nearly always get the 'wrong' result in one direction or the other when doing a /u copy from FAT to NTFS or vice versa
Hence the /UF.

It looks to me like, when Windows copies from NTFS to FAT, the file time gets rounded to the nearest two-second interval, not truncated as I would expect.