home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / COMPRESS / AUTOLZ.ZIP / SHELLZE.BAT < prev   
Encoding:
DOS Batch File  |  1990-08-05  |  1.3 KB  |  53 lines

  1. ECHO OFF
  2. REM         Read LZE_READ.ME for instructions on how to use this .BAT file. 
  3. REM         First make sure it is a COM or EXE file. If so, jump to DOIT
  4. IF %3==COM GOTO DOIT
  5. IF %3==EXE GOTO DOIT
  6. REM         If it is neither a COM nor an EXE file EXIT.
  7. GOTO EXIT
  8. :DOIT
  9.  
  10. REM         Print the name of the file to be compressed and give the user
  11. REM         the opportunity to skip the current file.
  12.  
  13. ECHO    The next file is %1.
  14. ECHO    If you want to skip this file press CTRL-C to terminate this
  15. ECHO    running of the shellze batch file.
  16. PAUSE
  17.  
  18. REM         The user wants to do this file, so send it's name to the printer.
  19.  
  20. ECHO %1 >LPT1
  21.  
  22. REM         Now compress the file.
  23.  
  24. LZESHELL %1
  25.  
  26. REM         If this is a COM file, jump.
  27.  
  28. IF %3==COM GOTO DOCOM
  29.  
  30. REM         It is an EXE file, check to see if an .OPK file exists.
  31. REM         and if so, rename it to .OLD.
  32.  
  33. IF NOT EXIST %2.OPK GOTO EXIT
  34.  
  35. REM         There is a .OPK file so erase the .OLD file and rename .OPK to .OLD
  36.  
  37. IF EXIST %2.OLD DEL %2.OLD
  38. REN %2.OPK %2.OLD
  39. GOTO EXIT
  40.  
  41. :DOCOM
  42.  
  43. REM         It was a .COM file, so erase the .OLD version and rename
  44. REM         the .COM version to FILENAME.CMM
  45.  
  46. IF EXIST %2.OLD DEL %2.OLD
  47.  
  48. IF EXIST %2.EXE REN %2.COM %2.CMM
  49.  
  50. :EXIT
  51.  
  52. REM         DONE!
  53.