home *** CD-ROM | disk | FTP | other *** search
- @echo off
- REM ScanArc.bat Written by Jerry Cain 08/01/91 1:300/8
-
- REM ScanArc.BAT is used to uncompress only EXE, COM, and OVL files. It
- REM then calls SCAN to scan for viruses. If a virus is found, it will
- REM rename the original compressed file and give it an extension of
- REM "BAD". It then updates a log called ScanArc.log.
-
- if NOT '%1' == '' goto CHKPRM2
- cls
- echo please include a filename to check.
- echo aborting...
- goto end
-
- :CHKPRM2
- if NOT '%2' == '' goto PROCESS
- cls
- echo please include a decompression program
- echo aborting...
- goto end
-
- :PROCESS
- echo
- echo Scanning Archive for viruses in
- echo
- echo.
- echo.
-
- md ■vchk
- cd ■vchk
- copy ..\%1 >nul
-
- if "%2" == "lha" %2 e %1 *.exe *.com *.ovl
- if "%2" == "pkunpak" %2 -e %1 *.exe *.com *.ovl
- if "%2" == "arj" %2 e %1 *.exe *.com *.ovl
- if "%2" == "pkunzip" %2 -e %1 *.exe *.com *.ovl
- if "%2" == "pak" %2 /e %1 *.exe *.com *.ovl
-
- scan . /NOMEM
-
- echo Y > ■del
- del *.* < ■del >nul
-
- cd..
- rd ■vchk
-
- if errorlevel = 2 goto PERROR
- if errorlevel = 1 goto VIRUS
- if errorlevel = 0 goto OK
-
- :PERROR
- echo Abnormal Program Termination
- echo Abnormal Program Termination when scanning "%1" >> scanarc.log
- goto END
-
- :VIRUS
- echo
- echo One or more Viruses found
- echo
- echo possible virus found in "%1" >> scanarc.log
- ren %1 *.vir
- goto END
-
- :OK
- echo No Viruses found in "%1"
- echo no viruses found in "%1" >> scanarc.log
-
- :END
-
-