home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
BBS_UTIL
/
BM0406_A.ZIP
/
DOCS.ZIP
/
TESTC.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-04-06
|
2KB
|
87 lines
@echo off
break off
REM %1 = File Name
REM %2 = VCHK file (file RBBS checks for errors)
REM %3 = COM port
REM %4 = Archive Type (ZIP, ARJ, LZH, etc)
rem ECHO Testing %6 File Integrity... > %3
IF %4 == ZIP goto ZIP
IF %4 == ARJ goto ARJ
IF %4 == LZH goto LZH
GOTO EXIT
:ZIP
C:\DOS\SHOWIT C:\SCR1 > %3
PKUNZIP -t %1 > nul
IF ERRORLEVEL 1 GOTO ARCERR1
C:\DOS\SETERROR 0
C:\DOS\SHOWIT C:\SCR2 > %3
C:\RBBS\UTIL\STRIPZIP %1 > nul
MD D:\TEST%node%
C:\DOS\PKUNZIP -o %1 D:\TEST%node% > nul
GOTO TEST
:ARJ
C:\DOS\SHOWIT C:\SCR1 > %3
ARJ t %1
IF ERRORLEVEL 3 GOTO ARCERR1
C:\DOS\SETERROR 0
C:\DOS\SHOWIT C:\SCR2 > %3
MD D:\TEST%node%
ARJ e %1 D:\TEST%node% > nul
GOTO TEST
:LZH
MD D:\TEST%node%
copy %1 D:\TEST%node%
D:
CD D:\TEST%node%
LHARC e %1
C:
GOTO TEST
:TEST
C:\DOS\SHOWIT C:\SCR3 > %3
C:\DOS\SCAN /A /NOMEM D:\TEST%node%\*.* > nul
IF ERRORLEVEL 2 GOTO ERROR2
IF ERRORLEVEL 1 GOTO ERROR1
IF EXIST D:\TEST%node%\DESC.SDI COPY D:\TEST%node%\DESC.SDI C:\RBBS\NODE%node%\NODE%node%DIZ
IF EXIST D:\TEST%node%\FILE_ID.DIZ COPY D:\TEST%node%\FILE_ID.DIZ C:\RBBS\NODE%node%\NODE%node%DIZ
C:\DOS\SHOWIT C:\SCR4 > %3
ECHO %4 File Passed Scan for Virii! > %3
ECHO The Small Time BBS Thanks you for Supporting Shareware > %3
GOTO KILLDIR
:ARCERR1
ECHO ERROR IN ARCHIVE > %2
C:\DOS\SHOWIT C:\ITFAIL > %3
ECHO Deleting File and Removing Credits! > %3
COPY %1 K:\RBBS\FILES\UPLOAD\HOLD
ECHO ERROR IN %4 FILE %1 >> K:\RBBS\FILES\UPLOAD\CRC.LOG
GOTO KILLDIR
:ERROR1
C:\DOS\SHOWIT C:\VIFAIL > %3
ECHO VIRUS IN ZIPFILE > %2
ECHO VIRUS IN ZIPFILE %1 >> K:\RBBS\FILES\UPLOAD\VIRUS.LOG
COPY %1 K:\RBBS\FILES\UPLOAD\HOLD
GOTO KILLDIR
:ERROR2
C:\DOS\SHOWIT C:\SCR4 > %3
ECHO NOT ENUF MEMORY TO TEST %1 >> K:\RBBS\FILES\UPLOAD\VIRUS.LOG
IF EXIST D:\TEST%node%\DESC.SDI COPY D:\TEST%node%\DESC.SDI C:\RBBS\NODE%node%\NODE%node%DIZ
IF EXIST D:\TEST%node%\FILE_ID.DIZ COPY D:\TEST%node%\FILE_ID.DIZ C:\RBBS\NODE%node%\NODE%node%DIZ
:KILLDIR
C:\DOS\KDY D:\TEST%node%
GOTO EXIT
:EXIT
C:\DOS\SETERROR 0
C:
CD C:\RBBS