home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / COMPRESS / AUTOLZ.ZIP / LZE_READ.ME < prev    next >
Encoding:
Text File  |  1990-08-05  |  6.1 KB  |  143 lines

  1.  
  2.      ;--------------------------------------------------------------;
  3.      ;                                    ;
  4.      ;     DoTree + Di + Shellze = Run LZESHELL on an entire drive    ;
  5.      ;                                    ;
  6.      ;--------------------------------------------------------------;
  7.  
  8.      This file will explain how you may automatically run LZESHELL on every
  9. .EXE and .COM file on a drive.
  10.  
  11.      To put it simply, put DOTREE.EXE, DI.COM, and SHELLZE.BAT in a directory
  12. that is in your Path along with the LZESHELL.EXE, LZEXE.EXE, COMTOEXE.EXE,
  13. and the UPACKEXE.EXE files. Turn on your printer and get it ready to print,
  14. and then, from a DOS prompt, enter the following command:
  15.  
  16.  
  17.       DOTREE /Q/XDI /E/XSHELLZE %1 %2 %3
  18.  
  19.  
  20.      The above command will execute 2 nested programs, a batch file, and 
  21. (indirectly) the LZESHELL program, but before you execute this command, 
  22. read on a little further and I will explain its significance.
  23.  
  24.             DoTree command executor
  25.  
  26.      The first part of this command is DoTree. DoTree is a public domain
  27. program that will execute a program, command, or batch file once from
  28. every directory and subdirectory on a drive. The "/Q" after DoTree causes
  29. DoTree to pause at each directory and ask the user if the command should
  30. be run in that directory. The "/X" tells DoTree that what follows is the
  31. command to be run (in this case "DI /E/XSH...."). If you run DoTree without
  32. any arguments, a help screen will be displayed. See the DOTREE.DOC file for
  33. further info.
  34.  
  35.  
  36.             DI, The Directory Dicer
  37.  
  38.      The command that DoTree executes in every directory is DI. DI is a
  39. Charware product. Charware is like Shareware for Charity. If you use it
  40. and like it, you are asked to send some money to The Hunger Project.
  41. See DI.DOC for more details. Feel free to use the DI program as shown in
  42. this file, without registering it to see if it is a program you'd like
  43. to keep and maybe eventually register.
  44.      DI has way too many features to try to explain in this file (see DI.DOC).
  45. For the purpose of automating LZEXE, we will be running DI with but a few of
  46. its options, namely the "/E" option and the "/X" option.
  47.      When used as directed in this file, DI will list the file information
  48. for each file in the given directory. The /E command will cause the files
  49. to be listed alphabetically by Extension (as opposed to alphabetically by
  50. name.) For our purpose this will mean that LZEXE will be run on the .COM
  51. files first, and then the .EXE files of each directory.
  52.  
  53.  
  54.  
  55.  
  56.      The "/X" option after the "/E" option tells DI that what follows is
  57. a command that should be run once for each file that will be listed by DI.
  58. In this case, the command that will be run for each file in the directory
  59. is "SHELLZE %1 %2 %3". SHELLZE is the batch file, and the "%1 %2 %3" after
  60. it cause DI to pass it the name of the file, the name of the file minus the
  61. extension, and the extension. If, for instance, DI came across the file
  62. WORDPROC.EXE, it would print:
  63.  
  64.      WORDPROC EXE    69,321 bytes Jan. 27, 1988 11:42 am .A..
  65.  
  66.      DI would then execute the command "SHELLZE  WORDPROC.EXE  WORDPROC  EXE"
  67. thereby passing the full name and the parts thereof to the SHELLZE batch file.
  68. In this way, every file on the drive will be passed to the SHELLZE batch file
  69. in a way that will make it easy for the batch file to operate on the file.
  70.  
  71.  
  72.             SHELLZE.BAT
  73.  
  74.  
  75.      SHELLZE.BAT takes the filenames, and runs LZESHELL on them providing they
  76. are either .COM or .EXE files. If they are neither .COM nor .EXE files,
  77. SHELLZE exits without running anything.
  78.      As you are probably aware, LZEXE will rename the original .EXE file to
  79. an .OLD file so that if there were to be any problem with the newly compressed
  80. .EXE file, then it would be easy to retrieve the original uncompressed .EXE
  81. file.
  82.      When LZESHELL is run against a .COM file, the following files are
  83. produced:
  84.  
  85.      the original .COM file is left unchanged;
  86.      an interim .EXE file is created from the .COM file by COMTOEXE and is
  87.      then renamed with the .OLD extension;
  88.      the newly compressed .EXE file is created from the interim .EXE file.
  89.  
  90.      Since an .EXE file will not run when there is a similarly named .COM
  91. file in the same directory (because.COM files run before .EXE files,) I
  92. have put commands in the batch file that will rename .COM files to .CMM
  93. and erase the .OLD file (if and only if it is a .COM file being processed).
  94.      If the original file was an exepacked .EXE file, then the original
  95. file will be saved as an .OPK file after it is used to create an
  96. unexepacked .EXE file. This unexepacked version will in turn become an
  97. .OLD file after it is used to create the compressed .EXE file. The batch
  98. file checks to see if an .OPK file exists, and if so, it erases the .OLD
  99. file and renames the .OPK file with the .OLD extension so that only the
  100. original file and the new compressed versions will be left.
  101.  
  102.      There is a line in SHELLZE that will pause before each running of
  103. LZESHELL and give the user a chance to decide if a given file should be
  104. compressed. There is also a line that will print the name of any file that
  105. is passed to LZESHELL for compression.
  106.  
  107.      I have put REMark statements in the batch file to make it easy to
  108. understand how it is set up. I strongly reccommend reading the batch file
  109. before running the program. You may find that you want to alter the batch
  110. file before using it to compress the files on your drive.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.      Finally, before running these programs, make sure that the following
  117. files are in the path so that they can be found from any directory on the
  118. drive:
  119.  
  120.      DOTREE.EXE
  121.      DI.COM
  122.      SHELLZE.BAT
  123.      LZESHELL.EXE
  124.      LZEXE.EXE
  125.      COMTOEXE.EXE
  126.      UPACKEXE.EXE
  127.  
  128.  
  129.      If you are at all unsure about doing this, read about the PATH command
  130. in your DOS manual and type "SET <enter>" to see your current path.
  131.  
  132.      I have tested the method outlined above on my own hard drive and it
  133. works quite well. I hope you are pleased with it.
  134.  
  135.             Preston Moser
  136.             807 Bennett Ave. #6
  137.             Medford, Oregon 97504
  138.  
  139.             Compuserve #72621,1377   |8-)
  140.  
  141.  
  142. P.S.  Many Thanks to Fabrice Bellard for the wonderful compression program!
  143.