home *** CD-ROM | disk | FTP | other *** search
- CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS CMPDIR.DOC
-
-
- CMPDIR is a shareware utility to compare the contents of two
- subdirectories, and report the results. It can also be restricted to
- specific files or groups of files thru use of DOS wildcards. It is a
- very handy tool to have when installing software upgrades and new
- releases, or when you find there are two copies of the same
- application installed on, say, different network file servers and you
- need to know whether Bill's copy and Sue's copy are the same.
-
- A sample of the output produced by CMPDIR can be found later in this
- documentation. CMPDIR also returns a DOS errorlevel for testing from
- within a batch file, which makes it useful for things like insuring
- that network users are mapped to the correct version of DOS before
- allowing them to log in, etc.
-
-
- INSTALLATION
- ------------
- Installation of CMPDIR is straightforward and no special install
- procedure is supplied. Simply copy CMPDIR.EXE into a directory in
- your path, or put a batch file in your path which includes its fully
- qualified pathname.
-
-
- USAGE
- -----
- To use CMPDIR, simply issue the command with the two pathnames you
- wish to compare, plus any option switches you may wish to use to
- control its execution. The pathnames may include DOS wildcard
- characters in the filename, so you can restrict the comparison to only
- certain files in each directory.
-
- Issuing the CMPDIR command with no arguments produces a help screen
- like the following:
-
- CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS
- Usage: cmpdir [switches] directory_path_1 directory_path_2
-
- Switches:
- -c = don't physically compare apparent matching files
- -t = don't physically compare if only differ in timestamp
- -m = include matching files in listing
- -q = quiet - just return errorlevel at 1st mismatch
- -s = print summary only; do not list individual files
- -b = only consider files appearing in both directories
- -1 = only consider files appearing in directory_path_1
- -2 = only consider files appearing in directory_path_2
- -? = display this help information
-
- Errorlevel: 0 = no mismatches found
- 1 = miscompare of 2 files
- 2 = missing files
- 3 = both miscompares and missing files
- 98 = one or both directories empty or not found
- 99 = cmpdir usage error
-
- CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS CMPDIR.DOC
-
- OPTION SWITCHES
- ---------------
-
- An expanded discussion of the options appears below. The option
- switches provided in CMPDIR may appear anywhere in the command line;
- they don't have to precede the directory names. They may be either
- upper or lower case, and you may use either a dash (-) or slash (/) to
- identify an option. Each option must be specified separately, and
- must be separated from every other command line element by whitespace.
- i.e.
-
- CMPDIR -c -m DIRA DIRB is CORRECT
- CMPDIR -c-m DIRA DIRB is not
- CMPDIR -cm DIRA DIRB is not
-
- -c = don't physically compare apparent matching files
- -----------------------------------------------------
- By default, CMPDIR does a byte-for-byte comparison of the contents
- of any pair of files which appear, from the other properties (same
- name, size, and timestamp), to be identical. Using the -c option
- causes CMPDIR to bypass this physical comparison. This makes CMPDIR
- run very quickly, but you give up the absolute assurance that
- the files' contents are really identical.
-
- -t = don't physically compare if only differ in timestamp
- ---------------------------------------------------------
- By default, if a pair of files have the same name and size, but
- have a different date and/or time, CMPDIR will attempt to do a
- physical byte-for-byte compare to see if they are actually the
- same. It oftentimes happens that identical copies of a file have
- differing timestamps, and CMPDIR always tests for this possibility
- unless you use the -t option. When you use the -t option,
- identical files with different timestamps are considered to be
- mismatches.
-
- -m = include matching files in listing
- --------------------------------------
- Files which match in every respect (name, size, timestamp, and
- contents [unless you used the -c option] are omitted from the body
- of the output report by default. If you want matching files to be
- listed, include the -m option switch in your command line.
-
- -q = quiet - just return errorlevel at 1st mismatch
- ---------------------------------------------------
- This switch causes CMPDIR to omit its normal output report, and
- simply return the DOS errorlevel upon encountering a mismatch.
- Note that with this option errorlevel can never return as 3.
- The -q option does not cause suppression of error messages, just
- the detail report and summary.
-
- CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS CMPDIR.DOC
-
- OPTION SWITCHES continued
- -------------------------
-
- -s = print summary only; do not list individual files
- -----------------------------------------------------
- CMPDIR's report consists of two sections: body, where individual
- files are listed, and summary where overall statistics are
- reported for the entire operation (see examples). The -s option
- suppresses the listing of individual mismatched files, reporting
- them only in the summary. Note that this option can be used in
- combination with the -m switch to produce a listing of -only- the
- matching files.
-
- -b = only consider files appearing in both directories
- ------------------------------------------------------
- The -b says "I don't care about the files that exist in only one
- directory or the other, just tell me about those that are in
- both places."
-
- -1 = only consider files appearing in directory_path_1
- -2 = only consider files appearing in directory_path_2
- ------------------------------------------------------
- These options are useful when you want one of the paths to be the
- "controlling" path for the report. As an example, suppose you have
- a directory named BIN in which you keep many different utilities,
- shareware packages, etc. Then say you receive an updated version of
- one of the packages and you want to see what files changed from
- the old version to the new. Create a directory and unzip the new
- package, then do "CMPDIR -1 C:\NEW_PKG C:\BIN". Without the "-1"
- switch, the report would list all the many other files in \BIN
- that have nothing at all to do with the files of interest.
-
- -? = display this help information
- ----------------------------------
- Entering CMPDIR -? (or simply CMPDIR with no arguments) produces
- the help screen illustrated previously in this document.
-
-
- CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS CMPDIR.DOC
-
- CMPDIR Sample Output
- --------------------
-
- Below is a sample of the output report generated by CMPDIR. Note that
- the first file listed is a subdirectory name. The status indicators
- have the following meaning:
-
- T = the timestamps are different
- S = the sizes are different (hence contents have to be also)
- C = the contents are different
- = = the timestamps are different but contents is the same
- E = error on open or read for file compare; files MAY match
- M = the files match (shown only if -m switch used)
-
- CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS
- T:\HYPER\*.* T:\HYPER\STORE08.VER\*.*
- -------------------------- --------------------------
- size timestamp --filename-- size timestamp status
- -------- ----------------- -------- -----------------
- 0 91/09/30 08:38:08 store08.ver
- 118120 92/04/20 05:42:04 answer.log
- 142 90/08/07 17:23:36 answer.nix 147 89/07/20 11:01:22 TS
- 18705 89/02/03 17:09:36 answer.rdy 17914 88/06/06 14:19:30 TS
- 47 89/05/26 08:55:44 batch.rcv 25 89/03/06 18:40:20 TS
- batch.snd 71 89/07/20 11:04:04
- 94 89/07/17 14:06:24 batch08.mor
- 47 89/07/18 07:56:00 batch08.snd
- 47 89/07/20 10:53:44 batch10.snd
- 363 89/08/17 12:52:00 call.log
- 172 89/08/17 12:50:34 call.lst 172 90/06/15 17:30:18 T C
- 19470 89/02/03 17:09:18 call.rdy 18411 88/04/08 13:53:52 TS
- 2911 89/05/26 08:15:44 color_ha.set
- 16 92/04/17 16:24:36 ha.bat 16 90/06/15 17:29:54 =
- 2911 89/06/02 16:20:18 ha.set 2911 89/05/26 08:46:44 =
- 93456 89/03/01 11:10:24 hacode.exe 93056 88/06/06 13:48:34 TS
- 84384 89/03/10 10:56:30 hacode.ovl 83872 88/06/06 13:48:32 TS
- 1004 88/09/23 10:49:18 modems.lst 1012 88/04/08 13:56:20 TS
- 13483 89/01/05 15:30:08 startup2.rdy 13876 88/04/11 13:22:14 TS
- 48 89/05/26 09:01:42 trans.nix 46 89/07/20 10:50:08 TS
-
- CMPDIR Summary:
- 7 names appear only in T:\HYPER\
- 1 names appear only in T:\HYPER\STORE08.VER\
- 31 names appear in both directories, of which there are
- 19 identical [M] (contents WERE compared)
- 2 identical [=] w/differing timestamps
- 10 differ in [T]imestamp, [S]ize or [C]ontents
-
- CMPDIR 2.0 (c)1990,1992 Developer Services Inc - Wichita KS CMPDIR.DOC
-
- Warranty, Registration, and Support Information
-
- Warranty of CMPDIR
- ------------------
- DSI warrants this product to perform essentially as described in this
- document, and no further warranty is offered or implied. Liability of
- DSI under this warranty is limited to refund of the amount you paid to
- us for license to use the software. DSI does not accept any liability
- for damages of any nature arising from the use of CMPDIR.
-
- Registering CMPDIR
- ------------------
- CMPDIR was written by Jim Cunningham of Developer Services, Inc., and
- is distributed as copyrighted shareware. The shareware concept allows
- you to try the software before you pay for it, to make certain that it
- performs as advertised, and that it is indeed useful to you. It does
- not give you the right to use it indefinitely without compensation to
- its owner.
-
- If you use CMPDIR and find it of benefit, you are required to register
- your copy and pay a small fee (see schedule on the order form) for its
- use. Registration of a copy of the software entitles you, the
- licensee, to use that copy on one computer at a time. You may have it
- installed on more than one computer as long as there is no chance that
- more than one copy will be in use at the same time. Registering also
- entitles you to technical support, and notice of future versions of
- the product.
-
- To register, please print a copy of the REGISTER.DOC file, fill in the
- blanks, and mail it along with registration fee (sorry, no credit
- cards yet) to:
-
- Jim Cunningham
- Developer Services, Inc.
- 1445 N Rock Rd, #175
- Wichita, KS 67206
-
- Technical Support
- -----------------
- Technical support for CMPDIR is available by phone, 8-5 Central Time
- Monday thru Friday, at (316) 634-2985, or via CompuServe, ID 75730,774.
- DSI also has a 24-hour FAX line at (316) 634-2092.
-