home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pcmag
/
vol9n03.arc
/
SCANMAX.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-11-29
|
4KB
|
82 lines
ECHO OFF
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ SCANmax will check the current disk's system sectors and all files. ║
ECHO ╟─────────────────────────────────────────────────────────────────────────╢
ECHO ║ If FASTrun was executed first, directory ))PCITK.TMP will be used to ║
ECHO ║ load all programs and batch files, otherwise they will be loaded from ║
ECHO ║ the CHECK 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 %1CHKBOOT.PRM GOTO MissingMT
IF NOT EXIST %1DELFILES.BAT GOTO MissingMT
IF "%PATH%"=="\))PCITK.TMP" GOTO Start
IF NOT EXIST %1SCANRFDR.BAT GOTO MissingADS
IF NOT EXIST %1CHKDSK.COM GOTO MissingADS
IF NOT EXIST %1CFCOMPC.COM GOTO MissingADS
GOTO Start0
:Help
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ Syntax is SCANMAX 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 ║ SCANmax will check the current disk's boot and partition sectors. ║
ECHO ║ It will then check the FAT, directory and files for consistency. ║
ECHO ║ SCANmax will then run the equivalent of a SCANsys, reading and checking ║
ECHO ║ all files for any changes, deletions or additions. The report will be ║
ECHO ║ written to 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. ║
ECHO ╟─────────────────────────────────────────────────────────────────────────╢
ECHO ║ You are missing the CHKBOOT.PRM or DELFILES.BAT. ║
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 ║ You are missing CHKDSK.COM, CFCOMPC.COM or SCANRFDR.BAT. ║
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
CHKBOOT %1CHKBOOT.PRM/B/P
CHKDSK/F
CD \
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