home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
trojanpr
/
condom.arc
/
CONDOM.BAT
next >
Wrap
DOS Batch File
|
1988-02-14
|
1KB
|
68 lines
: This is an example of a batch file which supports the Simple File
: Comparison program, DIF. The invocation syntax of this batch file is
: as follows:
:
: condom [d:][path]filename1 [d:][path]filename2
:
: where, of course, the quantities in square brackets, [], are optional.
:
: The DIF program is executed using the filenames specified to the batch
: file, and returns an error code which is examined. Appropriate action
: is taken depending upon what the error code was found to be.
:
: The user is free to specify whatever action s/he deems correct for the
: application at hand.
:
: Charlie Ros5e
: P.O. Box 1636
: Boulder, Colorado, 80306
:
: 303-939-5448
Echo Off
Echo Off
Cls
Echo Comparing Files %1 and %2
Echo
Echo
dif %1 %2
If ErrorLevel == 4 Goto Err4
If ErrorLevel == 3 Goto Err3
If ErrorLevel == 2 Goto Err2
If ErrorLevel == 1 Goto Err1
Goto Err0
:Err4
Echo Invalid number of parameters on the command line.
Goto Exit
:Err3
Echo At least one of the goddamn files doesn't even exist.
Echo Try to get with the program, will you?
Goto Exit
:Err2
Echo The files aren't even the same size.
Echo I'm not going to look at them any further.
Goto Exit
:Err1
Echo There is a difference of some kind somewhere.
Echo
Echo
Echo
Echo
Echo
Echo
Echo
Pause
Goto Exit
:Err0
Echo Everything seems to be just ducky!
Goto Exit
:Exit