0

I'm checking the integrity of my 'Old projects' CDs/DVDs with XCOPY *.* /s to my hard disk.
I have two copies of each CD/DVD, so the first copy goes to Folder1, the second to Folder2, and then I compare these folders.

I notice that the second XCOPY often goes really fast (typically < 20 seconds versus > 1.5 minutes for a CD), and this makes me suspicious:
It almost looks like the second copy is coming from a cache of the first one.

I remember making these copies in the past by telling the software (typically ImgBurn) to make two copies.

Could it really be that I'm reading from a cache? How can I find out? It would make this comparison method worthless....

This is on Windows 11

7
  • 1
    You probably not compare the CD's to eachother, but rather to a local folder. If you run the first CD twice, does it go the same speed as the 2nd CD? I bet it caches the local files in memory, and that is why it goes this fast. To rule out cache, reboot between the tests. Commented Feb 16, 2024 at 12:20
  • If the second CD is identical to the first, down to the same volume ID burnt by IMGBurn, then the OS may well be assuming that it is the same disk and files are served from the cache. In theory you would expect a disk removal and reinserted to invalidate any cache that is linked to that drive, but we don't know the inner workings of the Windows disk cache. It could simply be using the path of the file to retrieve items from the cache. As an alternative you could try robocopy which has an "unbuffered I/O" option so robocopy /J source dest might be worth a shot... Commented Feb 16, 2024 at 12:45
  • 1
    Out of preference though I'd be tempted to use a program such as md5sum to calculate hashes for every file, that way you can verify CDs independently without having to compare them to each other. Commented Feb 16, 2024 at 12:47
  • adamtheautomator.com/xcopy suggests that xcopy has the same /J switch for unbuffered I/O that might work. Commented Feb 16, 2024 at 12:50
  • @Mokubai A checksum program will fall into the same trap if caching is taking place. I'll try the /J Commented Feb 16, 2024 at 13:20

1 Answer 1

0

xcopy has an option to bypass the disk cache. From Microsoft: Xcopy

/j - Copies files without buffering. Recommended for very large files. This parameter was added in Windows Server 2008 R2.

It doesn't state your particular case, but "without buffering" implies an avoidance of disk caches and raw disk accesses.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.