home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pcmag
/
vol9n03.arc
/
SCANSYS.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-11-29
|
4KB
|
78 lines
ECHO OFF
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ SCANsys will check all files on the current disk. It will compare them ║
ECHO ║ with check data recorded on the CHECK or CHECK-MT diskette. ║
ECHO ╟─────────────────────────────────────────────────────────────────────────╢
ECHO ║ If FASTrun was executed first, files will be fetched from that disk, ║
ECHO ║ otherwise all programs and batch files will be loaded from the CHECK ║
ECHO ║ diskette. ║
ECHO ╟─────────────────────────────────────────────────────────────────────────╢
ECHO ║ PCDATA TOOLKIT 1.0 Copyright (C) 1990 Ziff Communications Co. ║
ECHO ║ PC Magazine ■ Wolfgang Stiller ║
ECHO ╚═════════════════════════════════════════════════════════════════════════╝
IF "%1"=="" goto Help
IF %1==? goto Help
CD %1\
IF NOT EXIST %1DELFILES.BAT GOTO MissingMT
IF "%PATH%"=="\))PCITK.TMP" GOTO Start
IF NOT EXIST %1SCANRFDR.BAT GOTO MissingADS
IF NOT EXIST %1CFCOMPC.COM GOTO MissingADS
IF NOT EXIST %1XALL.COM GOTO MissingADS
GOTO Start0
:Help
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ Syntax is SCANSYS a: ║
ECHO ║ where "a:" is the drive containing a CHECK or CHECK-MT diskette. ║
ECHO ║ The current disk must be the one which is to be checked. ║
ECHO ╟─────────────────────────────────────────────────────────────────────────╢
ECHO ║ SCANsys will check all files on the current disk. ║
ECHO ║ It will compute validity check information and then compare it with the ║
ECHO ║ information stored in the *.LOG files on the CHECK diskette. All ║
ECHO ║ changes, deletions or additions since last run will be written to ║
ECHO ║ the report file ))SYS.LOG in the root directory of the current disk. ║
ECHO ╚═════════════════════════════════════════════════════════════════════════╝
GOTO End
:MissingMT
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ You MUST have a valid CHECK or CHECK-MT diskette in the drive which ║
ECHO ║ you specified with the %1 parameter. File DELFILES.BAT is missing. ║
ECHO ╚═════════════════════════════════════════════════════════════════════════╝
GOTO End
:MissingADS
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ You MUST have a valid CHECK or CHECK-MT diskette in the drive which ║
ECHO ║ you specified with the %1 parameter. ║
ECHO ╟─────────────────────────────────────────────────────────────────────────╢
ECHO ║ File SCANRFDR.BAT, CFCOMPC.COM or XALL.COM is missing. ║
ECHO ╚═════════════════════════════════════════════════════════════════════════╝
GOTO End
:BadXall
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ Xall has failed. Please check the prior error messages. Most likely ║
ECHO ║ your COMSPEC environment variable does not point to a good COMMAND.COM. ║
ECHO ╚═════════════════════════════════════════════════════════════════════════╝
GOTO End
: Enter here if we are NOT executing on a "FASTrun" system
:Start0
PATH=%1\
: Enter here if "FASTrun" has set PATH and COMSPEC
:Start
CD \
CHKDSK/F
Xall scanRFdr %1
IF ERRORLEVEL 32 GOTO BadXall
ECHO ╔════════════════════════════════════════════════════════════════╗
ECHO ║ * * * Checking is complete * * * ║
ECHO ╟────────────────────────────────────────────────────────────────╢
ECHO ║ To continue, make sure you have a bootable disk in drive %1. ║
ECHO ╚════════════════════════════════════════════════════════════════╝
CD %1\
IF NOT "%PATH%"=="\))PCITK.TMP" GOTO End
ECHO Now removing copied files from disk and restoring path.
CD \))PCITK.TMP
SET COMSPEC=%1\COMMAND.COM
PATH=%1\
CD %1\
%1DELFILES
:End