COPY /u (?)

Dec 26, 2009
29
2
No where
So I have this batch file that runs once a day and just copies everything from drive F: to drive H: like this:

copy /su F:\*.* H:\

I've always understood the u parameter to mean only copy those files that have been 'updated' and it uses the file's time/date to determine if a file is 'newer'. Right?

Lately, I've been noticing that when the batch file runs, it is copying a lot of files that I know haven't been modified and haven't even been accessed in a long time. At first I thought maybe it's a bug in TCC (I always install the latest version as soon as you release them). But then I noticed that almost all of the files being unnecessarily copied are .zip files.

My anti-virus program has a setting "scan archived files" so I disabled that and I'll see what happens. Is it possible that the AV program is doing something when it scans .zip files that causes TCC to think that the file has been changed?
 
Usually this is because the file systems are different and have a different time resolution. If the time happens to be rounded down on the target, COPY/U will copy again each time. COPY/UF (COPY/S/UF) handles the situation.
 
Dec 26, 2009
29
2
No where
Drive F: is 6TB and Drive H: is 8TB, but File Systems are the same on both drives. NTFS/GPT.

It doesn't happen every time, and it's not all files, mostly just .zip files. That's why I thought of the anti-virus program, since it was set to scan archived files and only runs a scan a couple of times per week.

Weird.
 
Dec 26, 2009
29
2
No where
It doesn't happen every time, and it's not all files, mostly just .zip files. That's why I thought of the anti-virus program, since it was set to scan archived files and only runs a scan a couple of times per week.
Things just got really weird. After some testing, I have determined the problem, but it doesn't make sense and doesn't even seem like it should be possible.

(1) Run batch file and the only files copied are those that have been modified since last run. Exactly as expected.

(2) Boot from a USB thumbdrive containing Acronis True Image and create an image of my drive C: and save the image to a directory on drive G:

(3) Run batch file again, and dozens of .zip files on drives E: and F: are copied, even though they haven't been modified and haven't even been accessed in several months.

So, in conclusion, something has changed in the latest version of TCC or Acronis, or both. When Acronis creates an image of C: it somehow does something that modifies all my .zip files, on drives E: and F:, in a way that makes TCC think they have been modified and need to be copied to the backup drive.

WAIT . . . WHAT??!!
2RYAd.png
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,446
88
Albuquerque, NM
prospero.unm.edu
Is is possible that Acronis is touching your .ZIP files for some reason?

You can view full time stamps, down to the millisecond, with something like:
Code:
alias ls=pdir /d /h /k /m /(dy-m-d  th:m:sd  zc  f)
 
Dec 26, 2009
29
2
No where
Is is possible that Acronis is touching your .ZIP files for some reason?
That seems to be what is happening.

I may try reaching out to Acronis to see if they can explain why creating an image of C: results in Acronis touching .zip files (only .zip files!) on drives E: and F:
 
Dec 26, 2009
29
2
No where
Is is possible that Acronis is touching your .ZIP files for some reason?

You can view full time stamps, down to the millisecond, with something like:
Code:
alias ls=pdir /d /h /k /m /(dy-m-d  th:m:sd  zc  f)
I tried this and it does not appear that the timestamps are being changed, not even at the millisecond level. However, after some more experimentation, here is what I have found (spoiler alert: it doesn't make any sense).

(1) Do a backup using Acronis. Run my batch file
Code:
copy /esuvwxyz F:\*.* H:\
and it copies all the .zip files, even though they haven't been modified and shouldn't be copied.

(2) Do a backup using Acronis. Then, run the following command on any directories containing .zip files:
Code:
attrib -a *.zip
Then, run my batch file, and the .zip files are not copied.

WTF?

Why is copy /u affected by clearing the archive bit? I thought copy /m was used for that?
 
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
fpefpe Documentation copy /u Support 7
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