home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1990
/
03
/
scandir.bat
< prev
next >
Wrap
DOS Batch File
|
1989-11-28
|
4KB
|
75 lines
ECHO OFF
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ SCANdir will check the files in the current directory, comparing the ║
ECHO ║ resultant check data with that recorded on the CHECK diskette. ║
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 %1DELFILES.BAT GOTO MissingMT
IF "%PATH%"=="\))PCITK.TMP" GOTO Start
IF NOT EXIST %1SCANRFDR.BAT GOTO MissingADS
IF NOT EXIST %1CHKFILEC.COM GOTO MissingADS
IF NOT EXIST %1CFCOMPC.COM GOTO MissingADS
GOTO Start0
:Help
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ Syntax is SCANDIR 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 ║ SCANdir will check all files in the current directory and compare the ║
ECHO ║ results with that recorded on the CHECK diskette. SCANdir will ║
ECHO ║ report any file which has been changed, added or deleted. This report ║
ECHO ║ will be displayed upon the screen. ║
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. You are missing 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 CHKFILEC.COM, CFCOMPC.COM or SCANRFDR.BAT. ║
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
CHKFILEC *.* ))B.LOG /D/I:))
ECHO **** Checking is complete. *****
MIRdir %1
IF ERRORLEVEL 32 GOTO BadCHK
: To also see addtions and deletions of files, remove the /C parameter.
CFCOMPC %1))A.LOG ))B.LOG/P
IF ERRORLEVEL 4 GOTO CHANGES
DEL ))B.LOG
GOTO End
:Changes
COPY ))B.LOG %1))A.LOG
DEL ))B.LOG
CD %1\
GOTO End
:BadCHK
ECHO ╔═════════════════════════════════════════════════════════════════════════╗
ECHO ║ The corresponding directory was not found on the disk in drive %1. ║
ECHO ║ This usually means that the correct CHECK diskette is not in %1 or ║
ECHO ║ you have added directories since you last ran SCANmax or SCANsys. ║
ECHO ╚═════════════════════════════════════════════════════════════════════════╝
:End