home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
BBS_UTIL
/
BM0406_A.ZIP
/
DOCS.ZIP
/
TEST.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-04-06
|
2KB
|
82 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)
ECHO Testing %4 File Integrity... > %3
IF %4 == ZIP goto ZIP
IF %4 == ARJ goto ARJ
IF %4 == LZH goto LZH
GOTO EXIT
:ZIP
PKUNZIP -t %1 > nul
IF ERRORLEVEL 1 GOTO ARCERR1
C:\DOS\SETERROR 0
C:\RBBS\UTIL\STRIPZIP %1 > nul
MD D:\TEST%node%
C:\DOS\PKUNZIP -o %1 D:\TEST%node% > nul
GOTO TEST
:ARJ
ARJ t %1
IF ERRORLEVEL 3 GOTO ARCERR1
C:\DOS\SETERROR 0
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
ECHO Testing File for Virii... > %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
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
ECHO %4 Integrity Corrupt!... > %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
ECHO %4, There is a Virus in this %4 File!!! > %3
ECHO Deleting File and Removing Credits! > %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
ECHO NOT ENUF MEMORY TO TEST %1 >> J:\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