home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / arcid122.zip / PCBTEST.BAT < prev    next >
DOS Batch File  |  1996-06-01  |  2KB  |  129 lines

  1. @Echo off
  2. cls
  3.  
  4. if exist pcbpass.txt del pcbpass.txt
  5. if exist pcbfail.txt del pcbfail.txt
  6.  
  7. ARCID %1 ARC ARJ HYP LZH PAK RAR SQZ ZIP ZOO GIF
  8. if errorlevel 98 goto UNKNOWN
  9. if errorlevel 10 goto GIF_TESTING
  10. if errorlevel 9  goto ZOO_TESTING
  11. if errorlevel 8  goto ZIP_TESTING
  12. if errorlevel 7  goto SQZ_TESTING
  13. if errorlevel 6  goto RAR_TESTING
  14. if errorlevel 5  goto PAK_TESTING
  15. if errorlevel 4  goto LZH_TESTING
  16. if errorlevel 3  goto HYP_TESTING
  17. if errorlevel 2  goto ARJ_TESTING
  18. if errorlevel 1  goto ARC_TESTING
  19.  
  20. Echo ERROR: ARCID critical error...please notify sysop! > pcbfail.txt
  21. exit
  22.  
  23. :UNKNOWN
  24. Echo ERROR: Unknown file format! > pcbfail.txt
  25. exit
  26.  
  27. :ARC_TESTING
  28. md testing
  29. cd testing
  30. pkunpak -r %1
  31. if not errorlevel 0 goto ERROR1
  32. scan /a /nomem /nopause *.*
  33. if not errorlevel 0 goto ERROR2
  34. goto OK
  35.  
  36. :ARJ_TESTING
  37. md testing
  38. cd testing
  39. arj e -y %1
  40. if not errorlevel 0 goto ERROR1
  41. scan /a /nomem /nopause *.*
  42. if not errorlevel 0 goto ERROR2
  43. goto OK
  44.  
  45. :HYP_TESTING
  46. md testing
  47. cd testing
  48. hyper -x %1
  49. if not errorlevel 0 goto ERROR1
  50. scan /a /nomem /nopause *.*
  51. if not errorlevel 0 goto ERROR2
  52. goto OK
  53.  
  54. :LZH_TESTING
  55. md testing
  56. cd testing
  57. lha e /m1 %1
  58. if not errorlevel 0 goto ERROR1
  59. scan /a /nomem /nopause *.*
  60. if not errorlevel 0 goto ERROR2
  61. goto OK
  62.  
  63. :PAK_TESTING
  64. md testing
  65. cd testing
  66. pak e /wa %1
  67. if not errorlevel 0 goto ERROR1
  68. scan /a /nomem /nopause *.*
  69. if not errorlevel 0 goto ERROR2
  70. goto OK
  71.  
  72. :RAR_TESTING
  73. md testing
  74. cd testing
  75. rar e -o+ -y -std %1
  76. if not errorlevel 0 goto ERROR1
  77. scan /a /nomem /nopause *.*
  78. if not errorlevel 0 goto ERROR2
  79. goto OK
  80.  
  81. :SQZ_TESTING
  82. md testing
  83. cd testing
  84. sqz e %1
  85. if not errorlevel 0 goto ERROR1
  86. scan /a /nomem /nopause *.*
  87. if not errorlevel 0 goto ERROR2
  88. goto OK
  89.  
  90. :ZIP_TESTING
  91. md testing
  92. cd testing
  93. pkunzip -o %1
  94. if not errorlevel 0 goto ERROR1
  95. scan /a /nomem /nopause *.*
  96. if not errorlevel 0 goto ERROR2
  97. goto OK
  98.  
  99. :ZOO_TESTING
  100. md testing
  101. cd testing
  102. zoo e %1
  103. if not errorlevel 0 goto ERROR1
  104. scan /a /nomem /nopause *.*
  105. if not errorlevel 0 goto ERROR2
  106. goto OK
  107.  
  108. :GIF_TESTING
  109. giftest /b:0 %1
  110. if not errorlevel 0 goto ERROR1
  111.  
  112. :OK
  113. cd ..
  114. echo y|del testing\*.*
  115. rd testing
  116. Echo Archive passed all tests... > pcbpass.txt
  117. exit
  118.  
  119. :ERROR1
  120. echo y|del testing\*.*
  121. rd testing
  122. Echo ERROR: Archive failed integrity test... > pcbfail.txt
  123. exit
  124.  
  125. :ERROR2
  126. echo y|del testing\*.*
  127. rd testing
  128. Echo ERROR: Archive failed virus test... > pcbfail.txt
  129.