Story of this program.

The covert threat.

As well as many other PC users, I from time to time copy the files which have collected at my hard disk to compact discs. And as CD-writing drive at our office only one, I am due to copy these files over a local area network to the computer with this drive.

Having done once again this operation, I have found out, that the ZIP-file written down on a compact disc can not be unpacked. It has slightly surprise for me, since neither at copying, nor at recording, at the subsequent reading I did not receive any error messages. More detailed investigation has revealed, that the file was damaged at copying over network. Fortunately, I had not time to remove an initial file, and simply anew have copied a file.

After that case I have decided, that it is necessary to find means for the control of integrity of copied files. After short searches I have found the md5sum utility. This utility calculates the checksum of the specified files by MD5 algorithm. By comparing the checksums of a file before and after copying, I can check up identity of an initial file and a copy. It was all that is necessary for me!

Having begun to use this utility I have found out, that each time when I copy files to CD - R, usually several files has been found damaged. These damages occurs both at a stage of copying over a network, and at recording on CD - R. I do not know, why it occurs: because of bad quality of the equipment, or because of the software bugs. Or, maybe, the error correction algorithms incorporated in them begin to give failures at such volumes of the information. At least, now I had means of detection of the latent damages and I was once again convinced, that extra check never will superfluous…

Alternative.

Thus, this small utility has helped me to avoid possible losses of my data. Only, he had one restriction: can't process subfolders. To process a tree of folders I move in subfolder, launch the md5sum, move in the following subfolder, etc… It was rather tiresome and took away from me a heap of time.

I have decided that this process should be automated. Of course, to make recursive detour of subdirectories in language of scripts in Unix, this utility whence has come, it would be simple enough. Moreover, the version of the utility under Unix already had a feature for work with subdirectories. However, I needed such means under Windows and I still wanted to make some additions for the even greater automation and convenience of use.

In result I have written the program and called it Advanced CheckSum Verifier (in further ACSV). The program has two modes of operation: updating and verifying. In the updating mode it create special files with the checksums of files in the specified folder. In the verifying mode the program read these files and compares these values to the current checksum values of files. And if it finds out discrepancy (or absence of any file) the error event will be logged.

Now I launch the program, it start to scan the specified folders tree, and I quietly am engaged in the affairs. After completion of scanning, I look through the processing log. If I find files which has been damaged, I leave them for the next session of recording to CD - R. And speed of work of the program high enough: on my PII-400 under Windows NT 4.0 with 50-speed ASUS CD-ROM, the checking of the whole compact disc occupies about 2-3 minutes. Earlier when I used the program md5sum, it took away from me almost half an hour (if there were many folders).

© print print    November 30, 2006