home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1999 January / Simtel-MSDOS-Jan1999-CD1.iso / arcers / jar102x.exe / CONVPROT.BAT < prev    next >
DOS Batch File  |  1997-09-18  |  957b  |  34 lines

  1. @if "%1"=="" goto syntax
  2. @if "%2"=="" goto syntax
  3. @echo.
  4. @echo ----- Unprotecting archive -----
  5. JAR16 y %1 -g%2 -jg -jt
  6. @if errorlevel 1 goto abort
  7. @echo ----- Protecting archive using "Authenticate" method -----
  8. JAR16 y %1 -jg%2 -hg"Authenticate" -jt
  9. @if errorlevel 1 goto abort
  10. @echo ----- Archive sucessfully protected using "Authenticate" method -----
  11. @goto end
  12.  
  13. :syntax
  14. @echo.
  15. @echo -----------------------------------------------------------------
  16. @echo   Usage: convprot {archive} {password}
  17. @echo   Batch file first unprotects passworded archive and then
  18. @echo   protects it using the same password and "Authenticate" method
  19. @echo -----------------------------------------------------------------
  20. @echo.
  21. @goto end
  22.  
  23. :abort
  24. @echo.
  25. @echo -------------------------------------
  26. @echo   JAR returned non-zero error level
  27. @echo   Batch file aborted
  28. @echo -------------------------------------
  29. @echo.
  30. @pause
  31. @goto end
  32.  
  33. :end
  34.