home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / GENUTIL / jar102x.exe / TESTJAR.BAT < prev    next >
DOS Batch File  |  1997-09-18  |  3KB  |  133 lines

  1. @echo off
  2. echo.
  3. echo ---------------------------------------------------------------------
  4. echo  TESTJAR.BAT - batch file to test the reliability of JAR
  5. echo.
  6. echo  This is a batch file to test the reliability of JAR compressing and
  7. echo  decompressing your files on a specified drive. You can interrupt or
  8. echo  shorten this test by pressing CTL BREAK. Please read documentation
  9. echo  for more details about JAR testing.
  10. echo.
  11. echo  COMMAND SYNTAX:  testjar execute [drive_letter]
  12. echo ---------------------------------------------------------------------
  13. echo.
  14.  
  15. if NOT "%1" == "execute" goto end
  16.  
  17. if "%2" == "" goto no_drive
  18.  
  19. rem  ------ Drive letter specified ------
  20.  
  21. for %%i in (C c D d E e F f G g H h I i J j K k L l M m N n) do if "%%i" == "%2" goto driveok
  22. for %%i in (O o P p Q q R r S s T t U u V v W w X x Y y Z z) do if "%%i" == "%2" goto driveok
  23. goto bad_drive
  24.  
  25. :driveok
  26. if EXIST testjar.$$$ del testjar.$$$
  27.  
  28. echo.
  29. echo ------------------------------------
  30. echo  Detecting locked files on drive %2:
  31. echo ------------------------------------
  32. echo.
  33. echo on
  34. JAR16 sl %2:\* -r -ltestjar.$$$ -ha -y
  35. @echo off
  36. if errorlevel 1 goto aborted
  37. echo.
  38. echo ------------------------------------
  39. echo   Testing compression on drive %2:
  40. echo ------------------------------------
  41. echo.
  42. echo on
  43. JAR16 test archive %2:\* -m2 -r -jf -ho -x!testjar.$$$ -hbsh0
  44. @echo off
  45. if errorlevel 1 goto aborted
  46. del testjar.$$$
  47.  
  48. echo.
  49. echo ------------------------------------
  50. echo  Detecting locked files on drive %2:
  51. echo ------------------------------------
  52. echo.
  53. echo on
  54. JAR32 sl %2:\* -r -ltestjar.$$$ -ha -y
  55. @echo off
  56. if errorlevel 1 goto aborted
  57. echo.
  58. echo ------------------------------------
  59. echo   Testing compression on drive %2:
  60. echo ------------------------------------
  61. echo.
  62. echo on
  63. JAR32 test archive %2:\* -m2 -r -jf -ho -x!testjar.$$$ -hbsh0
  64. @echo off
  65. if errorlevel 1 goto aborted
  66. del testjar.$$$
  67. goto end
  68.  
  69. rem  ----- No drive letter specified ----
  70.  
  71. :no_drive
  72. if EXIST testjar.$$$ del testjar.$$$
  73.  
  74. echo.
  75. echo ------------------------------------
  76. echo  Detecting locked files on drive C:
  77. echo ------------------------------------
  78. echo.
  79. echo on
  80. JAR16 sl C:\* -r -ltestjar.$$$ -ha -y
  81. @echo off
  82. if errorlevel 1 goto aborted
  83. echo.
  84. echo ------------------------------------
  85. echo   Testing compression on drive C:
  86. echo ------------------------------------
  87. echo.
  88. echo on
  89. JAR16 test archive C:\* -m2 -r -jf -ho -x!testjar.$$$ -hbsh0
  90. @echo off
  91. if errorlevel 1 goto aborted
  92. del testjar.$$$
  93.  
  94. echo.
  95. echo ------------------------------------
  96. echo  Detecting locked files on drive C:
  97. echo ------------------------------------
  98. echo.
  99. echo on
  100. JAR32 sl C:\* -r -ltestjar.$$$ -ha -y
  101. @echo off
  102. if errorlevel 1 goto aborted
  103. echo.
  104. echo ------------------------------------
  105. echo   Testing compression on drive C:
  106. echo ------------------------------------
  107. echo.
  108. echo on
  109. JAR32 test archive C:\* -m2 -r -jf -ho -x!testjar.$$$ -hbsh0
  110. @echo off
  111. if errorlevel 1 goto aborted
  112. del testjar.$$$
  113. goto end
  114.  
  115. :bad_drive
  116. echo.
  117. echo ------------------------------------
  118. echo   Incorrect drive letter specified
  119. echo ------------------------------------
  120. echo.
  121. goto end
  122.  
  123. :aborted
  124. if EXIST testjar.$$$ del testjar.$$$
  125. echo.
  126. echo ------------------------------------
  127. echo          Testing aborted
  128. echo ------------------------------------
  129. echo.
  130. pause
  131.  
  132. :end
  133.