EXPEND-O-M

From Atari Wiki
Jump to navigation Jump to search
                             Expand-o-matic:
              Automatic File Extractor (Well, semi-automatic)
                               Version 1.5
                                12/20/92
                              Public Domain
                                   by
                              Andrew Cullum

If you are already familiar with an earlier version, see the attached
update.txt file for a brief list of the changes.

This program may be freely copied so long as all three files (expando.prg, 
expando.txt and expand15.rsc) are included in their original 
(i.e. unmodified) form.  If you find this program useful you might 
consider:
                Sending the author (namely me) $5-10
                Giving blood at your local Red-Cross
                Going out and buying a commercial program at your
                        local ST dealer
                Some other good deed

Thanks to those who gave me help on Pexec(), namely Carlos Sara,
Carlos Varela and Richard Syratt (Hope I got the names right, I'm
going from memory)

And Thanks to Fred Koch and Gordon Meyer for their suggestions for the
upgrade.

And forgive me, this is my first attempt at documentation.


So, what's it do?

Expand-o-matic is a shell for dealing with a variety of compressed
formats.  Most shells that I have seen allow you to do everything
that the various archivers can do, i.e. archive, extract, list files,
etc.  The problem with this is that they are not as convenient as they
might be.  As I almost never do anything other than extract files, I
decided to write a shell that is more convenient, at the price of
not being able to do the other functions.  Thus, after much swearing
and reading of manuals (normally in that order, and repeated several
times), was born Expand-o-matic.  The first time you run the program,
you will need to set it up (see the section on Setup below), to
tell it which archive types you deal with, and where the program for
that type is located.  After that, just give it the name of the file,
or if you are using NeoDesk or a Tos version of 2.05 or higher, drag 
the file onto the Expando.prg icon, and off it goes .  It looks at 
the extension of the file you give it, and calls the appropriate 
program for that type of archive.  All this is explained in more 
detail below.

Setup:
Before you can extract files with Expand-o-matic you will need to set
everything up.  To do this go to the Setup option under the File menu,
or hit Alt-s.  Across the top of the dialog box that appears it will
say:
        Ext.    Com.            Archive

and have a box beneath each.  Ext. stands for extension.  Click on the
box below it and enter the extension for an archive you deal with,
such as .ARC or .LZH.  If you enter lowercase letters, they will be
converted to uppercase for you.  Com.  stands for command.  This is 
the command that is used to extract that type of archive.  For all the 
archivers that I know of x is the  command you want, but I thought I would 
play it safe and make it configurable.  Click on the box and enter the 
appropriate command.  Archive is the program that should be run for 
files that end with the extension listed in the first box.  Click on 
the box below Archive and a file selector will pop up.  Select the 
program you want and click on OK.  The three boxes should then look 
something like this:

        .ARC    x       D:\ARCHIVES\ARC602\ARC.TTP

To add another extension, command and program, click on New.  See The
New Button below.

        To set where your files will be extracted to click to the right of
where it says Destination.  A file selector should appear.  Go to
the drive and directory that you want and click on OK.

        To set where it will go to for you to select files, click to the
right of where it says Source.  Select the source directory as you
did for the Destination above.

The New Button:
        Click on the button that says New and you will get a blank entry,
in which to add a second set of extension/command/program information.
Use the arrows on either side of the boxes at the top to scroll
through the sets that you have.

The Delete Button:
        Click on this to delete the set that is currently displayed at
the top.  You will be asked if you are sure that you want to do this.
Click Yes, or hit return, and it will be erased.

The Save Button:
        Click on the Save button to save your current configuration in
a file called EXPANDO.CFG.  Expand-o-matic looks for this file
when it starts up, and reads in the information if it finds it.  The
configuration information is stored in a regular text file, so if
things get messed up it should be easy enough to fix.  If you want to
edit the config file, see 'The Config File' below.

The Reload Button:
        This will read in the current EXPANDO.CFG file, thus returning
all your settings to the last time you saved (the poor man's cancel
option).

The OK Button:
        Use this to exit Setup

The Options Button:
        This button will take you to a seperate dialog box, with six
options listed on it.  If the box to the left of the option is
shaded, the option is turned on.  The options are:

Continue Until Cancel?
    If you have a lot of files to extract, click on the box by Continue
Until Cancel.  With this set, after the first archive is done, the
file selector will appear, prompting you for a second.  It will keep
doing this until you hit cancel.

Quit After Auto-run?
    If you check this box the program will automatically quit after
expanding files passed to it from the command line or by dropping
files onto the program.  Thus you just have to drop the file on the
icon, it'll extract it and then quit, you don't have to do anything
else.

Remember Directories?
        If this option is set, the program will keep track of the last
directory that you selected a file from while 'Expand'ing, and go
back to there for you to select the next one.  If this isn't set, the
file selector will go back to the folder you put into the 'Source' 
box.  If 'Source' isn't set either, it will go to the folder where
expando.prg is.

Auto-Create Directory?
        If this is set, Expand-o-matic will create a folder with the same
name as the file you are expanding, minus the extension, and expand
the files into there.  For instance, if your 'Destination' is
'd:\newstuff\', and you are unarcing 'neato.arc', it would create
'd:\newstuff\neato\' and unarc the files into there.

Use File Directory?
        If this is set your files will be uncompressed to the same
directory that your archive is located in (or a folder created in
that directory, if you have Auto-Create Directory set).

Prompt For Directory?
        With this option set, after you select the file(s) to uncompress,
you will be presented with another file selector and asked to choose
the directory for the files to be placed in, rather than the
'Destination' or Expando directory being used.  If Auto-create is set
new folders will be created in the directory you select.  You can also
have it prompt you for the directory (without this option being set)
by holding down the alternate key when you select the name of the file
to unarchive.

Extracting Files:
        There are three ways to extract (or expand) files with
Expand-o-matic.  The easiest way, if you use NeoDesk or
TOS 2.05 or higher, is to simply drag the icon for the archive
you want to extract files from onto the icon for EXPANDO.PRG.
The program will the start up and automatically start extracting for
you.  If you pass it more than one file this way, by holding down
shift and selecting them all, Expand-o-matic will deal with each of
them in turn (Note: TOS 2.05 + only seems to pass the first file name
this way, so you can only drop one file at a time).
        The second way is to simply start up the program and go to the Expand 
option under the Files menu, or hit Alt-e.  You will then be presented 
with a file selector to pick the file that you want it to expand (also 
see Wildcards below).  If you hold down the alternate key when you click 
on OK (or hit return) you will then be presented with a file selector to 
pick the directory to send the files to (just as if you had the 'Prompt
for Directory' option set).  If you have the Continue Until Cancel option 
set, you will be presented with the file selector again after the first 
file is done, and this will continue, surprisingly enough, until you click 
on Cancel.  
        The last way is to rename EXPANDO.PRG EXPANDO.TTP and then enter the 
name(s) of the file(s) that you want to expand in the command line.

Wildcards:
        If you are using the Fileselector or Command Line to tell
Expand-o-matic which files to extract you can use wildcards to select
more than one file.  If you enter *.* it will do all files in the
path.  You can also use *.arc, etc to get all files that use one type
of  archiver.  I think file.* should also work, but I don't think
that one will come up much.  Anyway, using the file selector after
selecting 'Expand', simply enter *.* or *.arc, etc. for the filename.
If you are using it as a .ttp, you will need to put
'drive:\path\*.*', etc.  (i.e. d:\download\*.arc)

The Config File
The format is for the .cfg is as follows:

2               <---- The number of entries you have
.ARC x D:\ARC.TTP       <---- The 3 pieces of info for each entry,
.ZOO x D:\ZOO.TTP                 seperated by a space
10              <---- Integer containing the Options settings (see below)
E:\NEWSTUFF\            <---- Where to extract files to
D:\DOWNLOADS\           <---- Where to go for the files to expand.

If you use an archiver that has no command, and need to edit the .CFG
file by hand, put a | in for the command.  If the command you set up
has a space in it, the .CFG file needs a # in place of the space
(i.e. 'l#-d' would be saved in place of 'l -d')

Options Integer:
        The first six bits of the integer represent the six options.  
If bit 1 is set, 'Continue until Cancel' is on, bit 2 is for 
'Quit after Auto-run', 3 is 'Remember Directories' and 4 is
'Auto-Create Directories'.  5 is for 'Use File Directory'.  With
version 1.5 'Prompt For Directory' has been added, which is the sixth
bit.  If you need to change this, start at 0 (for no options on), add 
1 for the first option to be on, 2 for the second, 4 for the third, 8 
for the fourth, 16 for the fifth and 32 for the sixth.  So, to have 
'Continue' and 'Auto-Create' set, you would put 0 + 1 + 8 = 9 on that 
line.  In the example above I have 'Quit' and 'Auto-Create' set (2 + 8).



Questions, Comments, Criticisms, Requests, Enormous Cash Donations?
        Send 'em on in, I'd love to hear from you.
        I can be reached at: (In order of speed with which I will
                        see your message, but reverse order of
                        permanence of access for me.)

                E-mail:  elvis@watserv.ucr.edu
                Genie:   A.CULLUM1
                Real mail:
                        Andrew Cullum
                        995 Hymettus Ave
                        Encinitas, CA 92024
                        (Note: This is my parent's address, but it is much
                        more permanent than my current one is likely to
                        be, and mail can be forwarded from there)


Back to Packer/Depacker