Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

COPY /u (?)

Dec
47
2
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?
 
Another possibility: What are drive F: and H: ? Are they, perhaps, different file systems?
 
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.
 
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.
 
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
 
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)
 
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:
 
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

Replies
7
Views
2K
Back
Top