home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MAGAZINE / MISC / CD01SEPT.ZIP / SCANALL.ZIP / SCANARC.BAT < prev   
Encoding:
DOS Batch File  |  1991-08-01  |  1.5 KB  |  70 lines

  1. @echo off
  2. REM  ScanArc.bat    Written by Jerry Cain     08/01/91     1:300/8
  3.  
  4. REM  ScanArc.BAT is used to uncompress only EXE, COM, and OVL files. It
  5. REM  then calls SCAN to scan for viruses. If a virus is found, it will
  6. REM  rename the original compressed file and give it an extension of
  7. REM  "BAD". It then updates a log called ScanArc.log.
  8.  
  9. if NOT '%1' == '' goto CHKPRM2
  10. cls
  11. echo please include a filename to check.
  12. echo aborting...
  13. goto end
  14.  
  15. :CHKPRM2
  16. if NOT '%2' == '' goto PROCESS
  17. cls
  18. echo please include a decompression program
  19. echo aborting...
  20. goto end
  21.  
  22. :PROCESS
  23. echo 
  24. echo               Scanning Archive for viruses in "%1"
  25. echo 
  26. echo.
  27. echo.
  28.  
  29. md ■vchk
  30. cd ■vchk
  31. copy ..\%1 >nul
  32.  
  33. if "%2" == "lha"     %2  e %1 *.exe *.com *.ovl
  34. if "%2" == "pkunpak" %2 -e %1 *.exe *.com *.ovl
  35. if "%2" == "arj"     %2  e %1 *.exe *.com *.ovl
  36. if "%2" == "pkunzip" %2 -e %1 *.exe *.com *.ovl
  37. if "%2" == "pak"     %2 /e %1 *.exe *.com *.ovl
  38.  
  39. scan . /NOMEM
  40.  
  41. echo Y > ■del
  42. del *.* < ■del >nul
  43.  
  44. cd..
  45. rd ■vchk
  46.  
  47. if errorlevel = 2 goto PERROR
  48. if errorlevel = 1 goto VIRUS
  49. if errorlevel = 0 goto OK
  50.  
  51. :PERROR
  52. echo Abnormal Program Termination
  53. echo Abnormal Program Termination when scanning "%1" >> scanarc.log
  54. goto END
  55.  
  56. :VIRUS
  57. echo 
  58. echo One or more Viruses found
  59. echo 
  60. echo possible virus found in "%1" >> scanarc.log
  61. ren %1 *.vir
  62. goto END
  63.  
  64. :OK
  65. echo No Viruses found in "%1"
  66. echo no viruses found in "%1" >> scanarc.log
  67.  
  68. :END
  69.  
  70.