A simple folder comparison tool is done

Today I was dealing with a problem: 6 different folders of a project had turned up on my machine. For 4 of them I know how and why they were created, but I wanted to know what the differences between them are. For two of them I have no idea how they came about, and I want to check whether they are just a copy of one of those 4 folders. Using Total Commander didn’t even cross my mind, partly because the comparison would have to read all the files byte by byte, and that for every single folder comparison. With 6 folders, each between 900MB and 2GB, it would take a long time.

So I wrote my own simple program for it. Right after startup, the program loads from a txt file the list of files in each folder and the size of each file in bytes. It is faster to load 1 contiguous file containing only the relative path and size than to walk through entire folders. If you enter folders for which no snapshot has been created yet, they are of course scanned, and the result is saved to disk when the program exits. This is what the program looks like after startup:

0image

here you pick 2 folders, one on each side, and press the only visible button. You will then see this:

Image

The 4 buttons at the top switch which type of comparison is shown: either identical files, different files, or files only on the left or only on the right. Yes, it is a big drawback that, unlike TC, it can’t show the whole folder in a single listbox, but this probably won’t suit me and I’ll add it quickly. I haven’t tried it yet on the folders it was made for. 😀

Categories

Leave a Reply