SWAPARK (tm) Arkive Swaptimizer Version 1.12
PUBLIC DOMAIN software written by Kerry B. Rogers

Indicators:         [...] = optional   {...} = at least ONE choice required
                        / = required       | = "or" choice to follow

Abbreviations: 1ZIP 2PAK 3DWC 4PKA 5ARC 6ZOO 7LZH (use in place of #'s below)

Syntax: swapark arkname[.ext] [filename.ext] /{parameter parameter ...}
͵^space reqired
 mimove filename.ext into arkname (delete filename.ext from dir)
 cicopy filename.ext into arkname (leaves filename.ext in dir)
 momove filename.ext out of arkname (delete filename.ext from arkname)
 cocopy filename.ext out of arkname (leaves filename.ext in arkname)
 rremove filename.ext from arkname (no extract takes place)
 v[t]verbose list of arkname's contents ([t]echnical for ZIP only)
 ttest integrity of each of arkname's individual internal files
 puser is prompted for decision making processes (defaults overrided)
 l[a]maintain log of all disk I/O to "\SWAPARK.LOG"([a] signifies append)
 o[#][.]optimize with priority ####### in case there's a tie for smallest
 f|sfast (speed) or slow (size) compression (ZIP & DWC only)
 to#convert arkname to arkformat using format number "#" (see above)

        Swapark is a beginning. There are many things that I ultimately wish to
do with various arkivers on the market but for now, this'll suffice (I suppose).
Should you have any problems, I am available at the below listed number for the
purpose of leaving voice mail.

        For personal reasons, I have elected to place this version of SWAPARK
into the PUBLIC DOMAIN. All other versions of SWAPARK retain reserved rights as
annotated in each version.

ABBREVIATIONS. These are numeric abbreviations used to represent the corres-
ponding arkive extension. For instance, in the parameter switches "O" for
"optimize" and "to" for "convert to" you would used these numbers after the
former switches to signify an arkive format.

        Example: sw myark.zip /to3

This command line says "convert myark.zip to myark.dwc". You see, "to3"
signifies "convert to format number 3" which, according to the list provided by
SWAPARK's help screen, is Dean W. Cooper's "DWC" arkive format. The extension
".zip" is really optional as SWAPARK will search the present directory for the
name "myark" and use the 1st occurance of "myark" that has one of the seven
supported arkive extensions. The only reason I could see using the ".zip"
instead of letting SWAPARK find the extension itself, thus saving typing, is
because you could have a "myark.zip" and "myark.pak" in the same directory and
only want to convert the ".zip". Why... I don't know...

PARAMETERS. Each of the parameters after the "/" in the command line are a
statement from me to the creators of arkivers that it is possible to
make the calling parameters make sense. Sheesh.

MI (MoveIn) -
        This parameter tells SWAPARK to take the specified files and,
        not only build (or update) an arkive, but after placing a
        compressed copy of the applicable files in the arkive, delete
        the existing copy of that(those) files from the present
        directory. In other words, it actually MOVES the file(s) into
        the arkive.

CI (CopyIn) -
        This parameter does the same as MI but does not delete the
        existing copy of the file from the directory.

MO (MoveOut) -
        This parameter tells SWAPARK to take the applicable file(s) from
        the arkive and return them to their normal condition in the
        directory and, at the same time, delete the compressed version
        from the arkive.

CO (CopyOut) -
        This parameter does the same as MO but does not delete the
        compressed copy of the extracted file from the arkive.

R (Remove) -
        This parameter simply deletes the named file(s) from the arkive.

 V (Verbose file list) -
VT (Verbose technical file list) -
        These two forms of contents listing each simply return a listing
        of the files contained within a given arkive. The addition of a
        "t" to the command line (directly after a "v" for verbose)
        forces the PKZIP technical verbose listing. This is only
        available with ZIP files. PKWARE's addition of the "vt" switch
        allows access to more technical information about an arkive.

T (Test arkive integrity) -
        This switch performs the "integrity check" inherent of many
        arkivers. Please note that LHarc (LZH extension) does not have
        this function at present. In its stead, a verbose listing is
        performed.

P (Prompting enable) -
        This parameter will enable prompting. When prompting is enabled
        SWAPARK will stop and poll the user for certain decision-making
        processes that it normally uses defaults for. One of these
        processes occurs when two files with the same name but different
        extensions exist in the same directory. SWAPARK will normally
        take the first one encountered in the directory listing, but
        with prompting enabled, access to other similarly named arkives
        on down the directory becomes possible.

L  (Maintain I/O and decision-making log. Write over existing log.) -
LA (Maintain I/O and decision-making log. Append to existing log.) -
        SWAPARK will create (or append to with LA) a log of all actions
        and the entire decision-making process including all file sizes
        when optimizing. This log is always called SWAPARK.LOG and
        always exists, when SWAPARK is finished, in the root directory
        of the presently active drive. Not only is this a great
        troubleshooting aid, error catcher, and statistics base but it
        also allows access to information about the things that happened
        while SWAPARK was active. You can use this function to see the
        file sizes of all files "O"ptimized to see just how each arkiver
        compares among other things.
 
O (Optimize) -
        Boy is this a long one! Perhaps SWAPARK's most important feature
        aside from actually swapping arkiver formats, the optimize
        parameter becomes a very powerful tool in making system backups
        when space is of the essence. On the help screen, you see a "#"
        and a "." after the "O" parameter. These both have great
        significance.

        First, although the help screen only shows one "#" after the "O"
        parameter, a maximum of seven (7) numbers are allowed. As
        mentioned before, the "#" represents the number preceding the
        arkiver extension in the "abbreviation" listing on the help
        screen. "1ZIP" means "1" stands for "ZIP". Similarly, "5ARC"
        means that the number "5" stands for the arkiver that uses the
        extension "ARC" (PKARC/PKUNARC). When you place these numbers
        after the "O" parameter, you are telling SWAPARK that in the
        event of a tie during the optimization procedure, follow the
        priorities I have outlined with these numbers in the order I
        have presented them. In essence, if you were optimizing a file
        called MYARC.ZOO which is presently 1024 bytes in size you could
        use the command line:

                sw myark /o51

        SWAPARK will still try all 7 arkiver formats and compare the
        sizes.

        Let's say the outcome was:

                tie--------------> myark.zip  920 bytes
                tie--------------> myark.pak  920 bytes
                                   myark.dwc  980 bytes
                                   myark.pka  960 bytes
                                   myark.arc  960 bytes
                                   myark.zoo 1024 bytes
                                   myark.lzh  922 bytes (fat chance)

        SWAPARK would rule out all formats except for zip and pak. It
        then would look at the parameters passed and see that you said
        "o51". It would think, "Hmmmm. ARC (#5) didn't have a chance"
        and rule out ARC. Then it would think "Hmmmm. Yep! The next tie
        breaker requested was 1 for ZIP and sure enough, ZIP tied with
        something! Ok. I'll leave it as ZIP."

        Simple? Well, for prosperity, if you use "o51" SWAPARK uses the
        other numbers, in order, to fill in after it like: "o5412367". It
        does this automatically. BUT!!! There is POWER HERE! You can
        optimize between just 2 formats (or 3 or 4 or etc...) by using
        another symbol! The period "."

        If you use "o513." then SWAPARK sees the period and says, "Ok. I
        won't try to optimize between all 7 formats, instead I'll use
        just ARC, ZIP, and DWC. In that order in the event of a tie for
        smallest." Hence the 5ARC, 1ZIP, and 3DWC...

F (Compress fast. Don't worry about size. Speed is more important) -
S (Compress slow. Don't worry about speed. Size is more important) -
        To be honest, I don't know why the ZIP and DWC formats even have
        this ability. Who cares about SPEED!? I mean, what we're trying
        to accomplish here is smooshing! The trade off here is so
        minimal, it's pathetic. Man. Doesn't make sense. Anyway. The
        above parentheses explain these two fully.

TO (Convert existing arkive to format specified by the "#")
        Please. Don't type the "#" after the "to". I should think by now
        you have the hang of my numeric abbreviations. To convert follow
        this somple syntax:

        sw myark /to1   (to change myark to zip format)
        sw myark /to7   (to change myark to lzh format)
        etc.

Closing note:

        At present, I have wildcard support only covered in the
        filenames passed to SWAPARK. Wildcards may not be used in the
        place of the arkive name or extension. I know this is a bother,
        but my dog died, a hurricane hit my house, and a tornado
        followed <sniff>......nah. I'll get to it. In the meantime, you
        may use wildcards by typing the command line from DOS in the
        following fashion:

        for %f in (*.ARC) do sw %f /to1     (convert all ARCs in this dir
                                             to the ZIP format)

        for %f in (PIC?.*) do sw %f /to2    (convert all files beginning
                                             with "PIC" and followed by
                                             another character with any
                                             of the seven supported
                                             arkiver formats to PAK
                                             format)

        Be careful about the latter. If SWAPARK finds a file that
        doesn't have one of the seven supported extensions, I don't know
        what will happen. In other words, ensure that that dir has only
        arkives in it (no doc, exe, com, bat, etc files).

        Note that to perform these DOS command lines from a batch file,
        double percent signs must be used (ie: instead of %f use %%f)

Any suggestions are welcome. Address to:         Kerry B. Rogers
                                                 c/o Joan M. Ray
                                                 5960 Maxham Rd.
                                                 Austell, Ga. 30001

or CompuServe 71514,735