home *** CD-ROM | disk | FTP | other *** search
-
- ;--------------------------------------------------------------;
- ; ;
- ; DoTree + Di + Shellze = Run LZESHELL on an entire drive ;
- ; ;
- ;--------------------------------------------------------------;
-
- This file will explain how you may automatically run LZESHELL on every
- .EXE and .COM file on a drive.
-
- To put it simply, put DOTREE.EXE, DI.COM, and SHELLZE.BAT in a directory
- that is in your Path along with the LZESHELL.EXE, LZEXE.EXE, COMTOEXE.EXE,
- and the UPACKEXE.EXE files. Turn on your printer and get it ready to print,
- and then, from a DOS prompt, enter the following command:
-
-
- DOTREE /Q/XDI /E/XSHELLZE %1 %2 %3
-
-
- The above command will execute 2 nested programs, a batch file, and
- (indirectly) the LZESHELL program, but before you execute this command,
- read on a little further and I will explain its significance.
-
- DoTree command executor
-
- The first part of this command is DoTree. DoTree is a public domain
- program that will execute a program, command, or batch file once from
- every directory and subdirectory on a drive. The "/Q" after DoTree causes
- DoTree to pause at each directory and ask the user if the command should
- be run in that directory. The "/X" tells DoTree that what follows is the
- command to be run (in this case "DI /E/XSH...."). If you run DoTree without
- any arguments, a help screen will be displayed. See the DOTREE.DOC file for
- further info.
-
-
- DI, The Directory Dicer
-
- The command that DoTree executes in every directory is DI. DI is a
- Charware product. Charware is like Shareware for Charity. If you use it
- and like it, you are asked to send some money to The Hunger Project.
- See DI.DOC for more details. Feel free to use the DI program as shown in
- this file, without registering it to see if it is a program you'd like
- to keep and maybe eventually register.
- DI has way too many features to try to explain in this file (see DI.DOC).
- For the purpose of automating LZEXE, we will be running DI with but a few of
- its options, namely the "/E" option and the "/X" option.
- When used as directed in this file, DI will list the file information
- for each file in the given directory. The /E command will cause the files
- to be listed alphabetically by Extension (as opposed to alphabetically by
- name.) For our purpose this will mean that LZEXE will be run on the .COM
- files first, and then the .EXE files of each directory.
-
-
-
-
- The "/X" option after the "/E" option tells DI that what follows is
- a command that should be run once for each file that will be listed by DI.
- In this case, the command that will be run for each file in the directory
- is "SHELLZE %1 %2 %3". SHELLZE is the batch file, and the "%1 %2 %3" after
- it cause DI to pass it the name of the file, the name of the file minus the
- extension, and the extension. If, for instance, DI came across the file
- WORDPROC.EXE, it would print:
-
- WORDPROC EXE 69,321 bytes Jan. 27, 1988 11:42 am .A..
-
- DI would then execute the command "SHELLZE WORDPROC.EXE WORDPROC EXE"
- thereby passing the full name and the parts thereof to the SHELLZE batch file.
- In this way, every file on the drive will be passed to the SHELLZE batch file
- in a way that will make it easy for the batch file to operate on the file.
-
-
- SHELLZE.BAT
-
-
- SHELLZE.BAT takes the filenames, and runs LZESHELL on them providing they
- are either .COM or .EXE files. If they are neither .COM nor .EXE files,
- SHELLZE exits without running anything.
- As you are probably aware, LZEXE will rename the original .EXE file to
- an .OLD file so that if there were to be any problem with the newly compressed
- .EXE file, then it would be easy to retrieve the original uncompressed .EXE
- file.
- When LZESHELL is run against a .COM file, the following files are
- produced:
-
- the original .COM file is left unchanged;
- an interim .EXE file is created from the .COM file by COMTOEXE and is
- then renamed with the .OLD extension;
- the newly compressed .EXE file is created from the interim .EXE file.
-
- Since an .EXE file will not run when there is a similarly named .COM
- file in the same directory (because.COM files run before .EXE files,) I
- have put commands in the batch file that will rename .COM files to .CMM
- and erase the .OLD file (if and only if it is a .COM file being processed).
- If the original file was an exepacked .EXE file, then the original
- file will be saved as an .OPK file after it is used to create an
- unexepacked .EXE file. This unexepacked version will in turn become an
- .OLD file after it is used to create the compressed .EXE file. The batch
- file checks to see if an .OPK file exists, and if so, it erases the .OLD
- file and renames the .OPK file with the .OLD extension so that only the
- original file and the new compressed versions will be left.
-
- There is a line in SHELLZE that will pause before each running of
- LZESHELL and give the user a chance to decide if a given file should be
- compressed. There is also a line that will print the name of any file that
- is passed to LZESHELL for compression.
-
- I have put REMark statements in the batch file to make it easy to
- understand how it is set up. I strongly reccommend reading the batch file
- before running the program. You may find that you want to alter the batch
- file before using it to compress the files on your drive.
-
-
-
-
-
- Finally, before running these programs, make sure that the following
- files are in the path so that they can be found from any directory on the
- drive:
-
- DOTREE.EXE
- DI.COM
- SHELLZE.BAT
- LZESHELL.EXE
- LZEXE.EXE
- COMTOEXE.EXE
- UPACKEXE.EXE
-
-
- If you are at all unsure about doing this, read about the PATH command
- in your DOS manual and type "SET <enter>" to see your current path.
-
- I have tested the method outlined above on my own hard drive and it
- works quite well. I hope you are pleased with it.
-
- Preston Moser
- 807 Bennett Ave. #6
- Medford, Oregon 97504
-
- Compuserve #72621,1377 |8-)
-
-
- P.S. Many Thanks to Fabrice Bellard for the wonderful compression program!
-