home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / UTIL_ARC / QAZ_230.ZIP / QAZ-DEMO.EXE / QAZTEST.BAT < prev    next >
DOS Batch File  |  1994-01-05  |  906b  |  45 lines

  1. @echo off
  2.  
  3. rem QAZTEST.BAT - Uses QAZ to generate a "list file" of filespecs in a ZIP
  4. rem               archive and then passes that list file to PKUNZIP as a
  5. rem               list of files to test.
  6.  
  7. if exist foo_bar.$$$ goto temp_file_exist
  8.  
  9. if exist %1.zip goto get_list_file
  10. echo Can't find file: "%1.ZIP"
  11. goto end
  12.  
  13. :get_list_file
  14. qaz %1.ZIP %2 /vq /b /r > foo_bar.$$$
  15. if errorlevel 51 goto not_zip
  16. if errorlevel 50 goto test_zip
  17. if errorlevel 0 goto not_zip
  18.  
  19. :test_zip
  20. if not exist foo_bar.$$$ goto temp_file_err
  21. pkunzip -t %1.ZIP @foo_bar.$$$
  22. if errorlevel 1 goto failed
  23. echo Files test Ok.
  24. del foo_bar.$$$
  25. goto end
  26.  
  27. :failed
  28. echo File(s) failed test.
  29. goto end
  30.  
  31. :temp_file_exist
  32. echo Cannot generate list file! ("foo_bar.$$$" exists)
  33. goto end
  34.  
  35. :temp_file_err
  36. echo Error generating list file!
  37. goto end
  38.  
  39. :not_zip
  40. echo "%1" is not a .ZIP file!
  41. goto end
  42.  
  43. :end
  44.  
  45.