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

  1. @echo off
  2.  
  3. rem QVIEW.BAT - Reads a text file.  If the file happens to be compressed
  4. rem by GZIP or Unix Compress, QVIEW will pipe the file to stdout (through
  5. rem MORE).  The result is that you can keep your frequently used text files
  6. rem compressed and yet still be able to read them using one command!
  7.  
  8. qaz %1 /r /vinq > nul
  9. if errorlevel 29 goto err
  10. if errorlevel 28 goto gzv
  11. if errorlevel 22 goto err
  12. if errorlevel 21 goto gzv
  13. if errorlevel 17 goto err
  14. if errorlevel 16 goto txv
  15. goto err
  16.  
  17. :txv
  18.  
  19. more < %1
  20. goto done
  21.  
  22. :gzv
  23. gzip -dc %1 |more
  24. goto done
  25.  
  26. :err
  27. echo Error: %1 is neither ASCII Text nor GZIP'd!
  28.  
  29. :done
  30.  
  31.