Short: Compare two dirs for different files, V1.1 Kurz: Vegleicht zwei Verzeichnisse miteinander, V1.1 Type: util/cli Uploader: Martin Gierich Author: Martin Gierich Version: 1.1 (5.10.97) CompareDirs allows you to compare the directory stucture of two directories and it compares all files, that can be found in both directories and all subdirectories, byte by byte. This is very useful for checking a backup of your harddisk on CD-recordable or another mass storage medium. Since it really compares all files, that will be output as identical, byte by byte you can be sure that no error occured during backing up. It is also practical to check for differences since the last backup. And if you have got a new archive of a program you already have, CompareDirs allows you to check it out for different files. The calling syntax is: CompareDirs [] [NOIDENT} or as a argument template: DIR1/A,DIR2/A,RESULTFILE,NOIDENT/S where dir1 and dir2 are the two directories to be compared and resultfile is an optional argument that specifies where output should be written to. By default all output goes to stdout, that means you will see it in the console window. The NOIDENT switch allows surpressing output of identical files. The output looks like: ---------------- snip ---------------- RAM:> CompareDirs DEVS: RAM:devs Scanning directory DEVS: Scanning directory RAM:devs Comparing files Showing results Identical files: DataTypes/ (0) DataTypes/8SVX (138) DataTypes/8SVX.info (1652) DataTypes/ILBM (138) DataTypes/ILBM.info (1652) DOSDrivers.info (1650) DOSDrivers/ (0) DOSDrivers/AUX (118) DOSDrivers/AUX.info (1813) mountlist (4252) parallel.device (4292) printer.device (27420) serial.device (5412) system-configuration (232) Files only in DEVS: : DOSDrivers/PC0 (787) DOSDrivers/PC0.info (1824) Mountlist.bak (4135) Files only in RAM:devs : bla.device (5712) Different files: clipboard.device (6944) mfm.device (6780 <-> 3848) ---------------- snip ---------------- Notes: Files of size zero are not (and cannot be) compared. Softlinks are treated like files of size zero, what means that their contents are not compared. It uses a 1MB memory block for comparing files to reduce disk accesses. So you will need at least one MB of continguous free memory to start CompareDirs. Copyright: CompareDirs is Freeware and comes with source code. This means you are allowed to distribute it (unmodified and with source code and this readme) and you can use it for free. It is still copyrighted by me. However I can give you no warranty, so use it at your own risk. ------ start of source code policy ------ You are allowed to make use of the source code, if you follow these three rules: 1. The resulting program must be Freeware. 2. The source code of it must be distributed with it, too. 3. This source code policy must be part of the copyright notice of it. ------ end of source code policy ------ Recompiling: I have compiled this using SAS/C, but it should be possible to compile it with any other compiler that supports Amiga function calls. If the fastmemcmp() routine is a problem, you can substitute it with memcmp() with a little speed loss. History: V1.0 (10.9.97): Initial release. V1.1 (5.10.97): ReadArgs() interface added, NOIDENT option added, Copyright notice changed. Author: Martin Gierich Narzissenweg 7 76297 Stutensee Germany EMail: Martin.Gierich@stud.uni-karlsruhe.de (replies might take one or two weeks) Homepage: http://www.uni-karlsruhe.de/~uj3w/ (overview of my other programs) My system used: AT A1200, OS3.1, Blizzard 68030/68882/50MHz IV board, 18MB total RAM, some harddisks Thanks for feedback goes to Roberto Agria and to Simone.