home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
diffx.zip
/
DIFF.ZIP
/
SCANNER.BAT
< prev
Wrap
DOS Batch File
|
1990-07-03
|
3KB
|
86 lines
@echo off
goto start
rem ** This is a batch file to automate the Crude Security System described in
rem ** the DIFF documentation.
rem **
rem ** The batch file will take either 1 or no parameters.
rem ** If you type 'SCANNER M', it will make a Benchmark file for you.
rem ** If you don't type any parameters, it will check and report differences.
rem ** As long as the batch file is found in your DOS path, you can run it
rem ** from anywhere with the same results.
rem **
rem ** If there are 0-1 differences, it simply displays them, and quits. You
rem ** may want to change the 2 for Yellow-Alert to a 0 so it will pause
rem ** even if there is only 1 difference. I usually have 1 difference,
rem ** so I don't make it pause.
rem ** If there are 2-10 differences, it displays them, pauses, and then quits.
rem ** If there are 11-20 differences, it displays them, displays a message,
rem ** pauses, then enters a lister to allow you to browse through the list.
rem ** If there are 20-250 differences, it displays them, displays a message,
rem ** pauses, then enters a lister to allow you to browse through the list.
rem ** If there are more than 250 differences, if displays them, displays a
rem ** message, pauses, then enters a lister to allow you to browse through
rem ** the list.
rem **
rem **
rem ** Initially, the batch file specifies several things that you may need
rem ** to change.
rem ** You may need to change ANYTHING that is in UPPERCASE characters.
rem ** You may also want to delete these comment lines from this batch file
rem ** so that it will execute faster. Users with a disk caching utility
rem ** will probably not notice much difference with or without them.
:start
if %1' == m' goto make
if %1' == M' goto make
goto check
:make
diff /m-C:\DIFF.LOG /o /r C:\
if errorlevel 251 goto error
goto end
:check
diff /c-C:\DIFF.LOG /d-C:\DIFF.DIF /s /r C:\
if errorlevel 255 goto lots
if errorlevel 251 goto error
if errorlevel 21 goto red
if errorlevel 11 goto orange
if errorlevel 2 goto yellow
goto end
:lots
cls
echo More than 250 differences found.
:red
cls
echo Between 20 and 250 differences found.
goto list
:orange
cls
echo Between 10 and 20 differences found.
:list
pause
rem Display the difference file using LIST - Vern Buerg's file display utility
rem Almost any browsing utility or text editor should work just fine in place
rem of LIST.
LIST C:\DIFF.DIF
goto end
:yellow
echo Between 2 and 10 differences were found
:error
pause
:end
cls