Documentation copy /u

Oct 18, 2008
339
2
Hello --- just to confirm, when files are copied (or moved) with the /u (or /c) switch, the entire 64 bit value of the ntfs (file) timestamp is used? so if the timestamp of a file just differs is in the "sub second" part of the file, that would cause the files to me copied ( or not)?
 
May 20, 2008
11,400
99
Syracuse, NY, USA
If the source and destination are both NTFS, it looks like it uses every one of those 64 bits.
Code:
v:\> echo %@fileage[f2.txt]
131789272146787914

v:\> echo %@fileage[pluggies\f2.txt]
131789272146787913

v:\> copy /u f2.txt pluggies\
V:\f2.txt =>! V:\pluggies\f2.txt
     1 file copied

v:\> echo %@fileage[pluggies\f2.txt]
131789272146787914

Code:
v:\> echo %@fileage[f2.txt]
131789275491168791

v:\> echo %@fileage[pluggies\f2.txt]
131789275491168790

v:\> move /u f2.txt pluggies\
V:\f2.txt ->! V:\pluggies\f2.txt
     1 file moved

v:\> echo %@fileage[pluggies\f2.txt]
131789275491168791
 
May 20, 2008
11,400
99
Syracuse, NY, USA
And
Code:
v:\pluggies> echo %@fileage[f2.txt]
131789278179897159

v:\pluggies> echo %@fileage[v:\f2.txt]
131789278179897160

v:\pluggies> copy /u f2.txt ..\
     0 files copied

v:\pluggies> move /u f2.txt ..\
     0 files moved
 
Oct 18, 2008
339
2
thanks for the info --- this could be problematic if programs are not adding in the nano-seconds
 
May 20, 2008
11,400
99
Syracuse, NY, USA
I first tested with TCC's TOUCH which only uses milliseconds and that's only good to one tick of the system clock (typically about 15.6 milliseconds). Then I wrote my own (in C) which made two FILETIMEs which differed by 1. That behavior is not at all normal. Even if a program uses GetSystemTimeAsFileTime to get a timestamp, that is only updated with every tick of the system clock ... typically every ~15.6 milliseconds. My current "system time adjustment" is 156003 (ten-millionths of a second). If I look at what GetSystemTimeAsFileTime gives (using my plugin _AGENOW), that's exactly the increment I see (~15.6 ms).

Code:
do forever ( echo %_agenow )
<snip>
131789451506789980
131789451506789980
131789451506789980
131789451506945983
131789451506945983
131789451506945983
 
May 20, 2008
11,400
99
Syracuse, NY, USA
My point was that programs can't even come close to using nanoseconds. Typically they get ticks of the system clock (~15.6 milliseconds). Even using HiRes timing (which is system-wide and a bit rude) you can only get that down to 1 ms.
 
Oct 18, 2008
339
2
My point was that programs can't even come close to using nanoseconds. Typically they get ticks of the system clock (~15.6 milliseconds). Even using HiRes timing (which is system-wide and a bit rude) you can only get that down to 1 ms.

again -- thx for the info
 

rps

Jul 6, 2008
436
6
thanks for the info --- this could be problematic if programs are not adding in the nano-seconds
Couldn't using a time range with the copy help?
You can even specify which of the three Windows times to use.
 
Similar threads
Thread starter Title Forum Replies Date
C Copy (sys) error Support 3
Alpengreis Fixed Crash after copy dialog with big TCC.exception.log Support 5
vefatica Copy/Paste anomaly Support 4
D Documentation Typo in COPY help Support 0
samintz COPY fails to copy from \\wsl$ Support 20
D Differences between TCC and CMD with COPY /b Support 4
fpefpe copy /u and timestamps Support 4
M Strange error messages from TCC in FTP copy Support 7
G TCMD crash when copy Support 3
Alpengreis How to? Copy DIRs with attributes ... Support 4
E Text copy bug Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
fpefpe copy/cat Support 7
K copy /w slow relative to robocopy /mir Support 0
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
K "copy /z /w" command not deleting read-only files in destination Support 10
K copy changing destination current directory Support 1
D Keystroke to copy previous argument Support 3
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
RChrismon How to? Copy TCMD.INI to New Version Support 7
R How to? Append files in multiple subfolders using copy? Support 8
Dick Johnson COPY /u (?) Support 9
R How to? copy /q ABC.txt + DEF.txt is appending hex 1A Support 8
D copy /g only shows transfer rate Support 1
J Error "Contents lost before copy" Support 3
B Can copy command concatenate multiple mp3 files Support 2
rps Documentation "Copy+Paste+run" question Support 2
kb6ojs Make /G parameter persistent in COPY/MOVE command? Support 4
fpefpe How to? copy / exclude Support 2
fpefpe robocopy -- copy /w Support 8
C copy /w /p prompts for deletion, but ... Support 3
D Fixed Copy Support 1
fpefpe Documentation copy/move using /c or /u Support 2
samintz WAD Copy/append adds a character Support 3
P Simple RegEx copy Support 9
fromano Fixed COPY ... TO ... crashing Support 3
Alpengreis How to? Copy & Paste without linebreak within TCMD Support 13
D COPY returns ERRORLEVEL 2 Support 5
mdwyer TCC 13 COPY: specified network name is no longer available. Support 5
CWBillow Copy a tree Support 17
J junction copy/move handling Support 6
vefatica Fixed COPY /S ftp://... Support 1
C WAD copy /u ftp local with Timeout? Support 5
D How to? Unregister a copy of Take command Support 1
vefatica FTP copy interrupted Support 2
C How to? COPY ftp folder query Support 7
R How to? TCC 16.03: copy a file to the clipboard? Support 10
jadaml Documentation Is COPY realy doesn't work for any HTTP and FTP? Support 3
T TCC control-C copy operation Support 3
Jay Sage Ctrl-C Not Working Reliably to Copy Screen Content Support 4

Similar threads