View Full Version : Disk content comparison test program

January 30th, 2017, 11:47 PM

I'm looking for a program to compare the files held on two disks. Something like:

Read directory disk 1
Read directory disk 2
Compare directory 1 and 2 (filenames only), report on discrepancies
For each file in directory 1, compare with the corresponding file in directory 2 (8 bit binary comparison, not ASCII) and report on any files that don't match

This is so that I can perform a large scale test of my uIDE interface. I thought someone would have written something to do this in the past. Any ideas?

January 31st, 2017, 04:21 AM
Depending on how "retro" you want the program to be, you might want to take a look at "diffall.py" in "Programming Python" by Mark Lutz. Lutz needed a tool to compare the "active" contents of a book in progress with a backup copy written previously to CD and spit out a list of changes.

If you can't or don't want to use Python, a similar process could be cobbled together in Turbo C, DOS shell, or some combination of whatever you have available.

January 31st, 2017, 04:45 AM
Yeah.. I was hoping not to have to write it. The file comparison part is easy, but the directory read not so much..

January 31st, 2017, 05:39 AM
I know you are probably wanting to do this in CP/M, but I usually take a different approach.

I copy all the subdirectories & files from each floppy into Linux Subdirectories. Then, I use MELD (in Linux Repo's) to compare directories to
find differences. Meld will also do two-way or three-way file comparison. If it's a binary comparison I need I use xxdiff, vbindiff,
or Diffuse Merge Tool (all in the Linux Repos's).

I also have RunCPM & MYZ80 available for use on my Linux Laptop.


February 1st, 2017, 05:36 AM
Not a bad idea Larry, and I have done that before. Might be a bit time consuming though.. and meanwhile, the interface is broken and I have to debug it. :(

February 2nd, 2017, 05:57 AM
Hi, Jon

Do you know Treesize Personal/professional by JAM Software? It available as a trial.

It gives a view of a complete directory tree, with sizes of sub-directories and a count of the files, down to a list of the individual files sorted by size or alphabetical by filename. And you can export the view to Excel, csv, clipboard, etc.

My low-tech approach to this would be to align the directories you want to compare in Excel, and then +IF(A1 = B1, 1,0). The cell contents can be just the filename, as you suggested, or you could concatenate filename, size, date, etc.



February 4th, 2017, 02:27 AM
So, it turns out that all I need to do to test my IDE drive is pip h:=c:*.*[v] (that is, copy all files from c: to h: with verify). Done.

A big thanks to Mike_Z for pointing this out! :)