home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / DESIRE15.ZIP / INSTALL.DAT / CHECK.BAT < prev    next >
DOS Batch File  |  1996-12-19  |  822b  |  44 lines

  1. @ECHO OFF
  2. REM **************************************************************************
  3. REM
  4. REM CHECK.BAT To check for corrupt archives.
  5. REM Corrupt archives are moved to the BROKEN directory.
  6. REM
  7. REM %1 = Name of archive to test
  8. REM %2 = Extension
  9. REM %3 = Broken archives dir
  10. REM %4 = Node Number
  11. REM %5 = Conference number (like in CONFCFG.x)
  12. REM 
  13. REM **************************************************************************
  14. if %2==ZIP goto ZIP
  15. if %2==ARJ goto ARJ
  16. if %2==TXT goto TXT
  17. goto end
  18.  
  19. :ZIP
  20. pkunzip %1 -T >FILEVIEW.%4 
  21. if ErrorLevel=0 goto ADDZIP
  22. REM FILE CONTAINS ERRORS!
  23. Move %1 %3 >NUL
  24. goto end
  25.  
  26. :ARJ
  27. arj T %1 >FILEVIEW.%4 
  28. if ErrorLevel=0 goto ADDARJ
  29. REM FILE CONTAINS ERRORS!
  30. Move %1 %3 >NUL
  31. goto end
  32.  
  33. :TXT
  34. goto end
  35.  
  36. :ADDARJ
  37. goto end
  38.  
  39. :ADDZIP
  40. goto end
  41.  
  42. :END
  43.  
  44.