Contents of the CONVERT.DOC file
Archive Convert Version 2.0
Copyright (c)1989 Ross Neilson Wentworth
All Rights Reserved
This software and documentation is copyrighted material. You
have permission to use it freely. You may give it away so long
as the program and documentation are given together and are
unmodified. It may not be sold or used as an incentive to buy
without prior written consent from the author.
If you find this program useful a donation of any amount would be
appreciated. If you make a donation you may receive the Turbo
Pascal 5.0 source code by including a disk and proper return
postage with your donation. I can support 360k, 720k and 1.44M
disks. Notice that I have not stated a minimum donation. I leave
this up to your conscious, i.e. don't donate a few pennies and
expect to be able to get the source code.
Send all donations to:
Ross Neilson Wentworth
1422 Elkgrove Circle, #3
Venice, CA 90291
The lastest version of this program can be found on TORRANCE BBS,
(213)370-9027 (6pm-9am weekdays, all weekend), Fido/Opus address
Currently, there are four popular and mostly incompatible
archiving utilities available. While a standard would be
beneficial to the BBS community, it's not likely to occur in the
near future. To help cope with the different formats and to make
conversion from one to another easy I wrote this program. It
allows conversion from one format to another, quickly and
The program doesn't actually do any conversion on its own.
Rather, it acts as a shell around the four archivers - automating
The four utilities supported are:
PKARC/PKXARC (a.k.a. PKPAK/PKUNPAK)
Other formats MAY work but there is no guarantee.
To use this program you must set to environment variables, "ARC"
and "UNARC". These two variables tell this shell program the
program names and command line options to use to uncompress and
compress the archive(s). ARC, obviously, is the name and options
(if any) to use to create the new archive with while UNARC is the
name and options (if any) to uncompress the original archive.
Suggested ARC settings:
ARC=PKZIP -A -EA4 -EB4
Suggested UNARC settings:
To set the environment varible type, at the command line, "SET"
followed by the variable setting. For example:
SET ARC=PKZIP -A -EA1 -EB1
Archiver Converter Page 2
I have successfully converted between all the supported formats
(all twelve possibilities), including nested archives (see
below). The following versions were tested:
There are limitations to the filename extension of the newly
o If the environment program name is ZOO (ignoring the
options) the new extension will be ZOO.
o If the environment program name is PAK (ignoring the
options) the new extension will be PAK.
o If the environment program name is PKZIP (ignoring the
options) the new extension will be ZIP.
All other program names will result in an extension of ARC. If
the program you use to re-arc ignores any given extension this
program will probably not work correctly.
The extension for the source archive can be anything SO LONG as
the unarcing program will accept it.
The original and new extensions can not be the same. If they
are, this program will halt with an error.
HOW TO RUN CONVERT
Once you have set the proper environment variables, running
CONVERT is trivial. Simply type CONVERT followed by the filename
(wildcards allowed). The filename MUST have an unambiguous
extension. The following are legal:
This is NOT allowed:
The time/date stamp of the newly created archive is set to the
time/date stamp of the NEWEST file contained within - not the
time/date of creation or time/date of the original archive. This
is the most logical (and highly requested) setting.
Archiver Converter Page 3
WHERE DID IT GO?
The original archive is deleted after the new archive is
successfully created. If you wish to retain the original archive
then you must make a backup copy or obtain the source code and
It is not uncommon to find archives nested inside an archive. A
program that includes source code may have the source code
archived and placed within the main archive. This program will
properly handle this situation and convert the nested archives to
the new format. Theoretically, an unlimited number of nested
archives can be handled but this has only be tested one deep.
The nested archive MUST have the same filename extension as the
parent archive to be converted, i.e. ARC with ARC. A PAK within
an ARC will not be converted.
If a file is found to be corrupted further processing on that
file is halted and the archive is renamed to have the extension
"BAD". If the corrupted archive is nested only the parent archive
is renamed. You will have to manually unarc the archive to find
the actual problem.
This program assumes that a file is corrupted when the "EXIT
CODE" for the unarc program is nonzero.
PAK version 1.0 is known to not return a proper error code so
this program will not work with. I'm not sure which version they
fixed the bug in. I do know that it works properly with PAK
The only enhancement I currently have planned is subdirectory
recursion. That is, automatically going through all
subdirectories of a disk as an alternative to the given (or
If you have any suggestions I would love to hear from you. I can
be reached through various programming ECHOS on the FIDO/OPUS
network (PASCAL or ECPROG) as well as in the PKWARE RelayMail
topic area. I can also be reached via netmail at 1:102/345.1.
Archiver Converter Page 4
EXTERNAL EVENT CONVERSION
Some bulletin board systems support timed "events". These events
are used to automate the operation of the board. Using an event
can make it possible for the bulletin board to automatically
handle the conversion of any archive type to the type supported
by the board. A BBS that automatically converts archive types
could allow the callers to upload archives of virtually any type.
Under FrontDoor, for example, you can use an external event for
this process. An external event causes FrontDoor to terminate
with a specified error level. The error level can then be
queried to decide what should be done.
Follows is a fragment from a possible batch file to do just this.
This example assumes all new uploads are placed in the
subdirectory "C:\UPLOADS". It will place all archives that are
possibly corrupted in the subdirectory "C:\BAD"
IF ERRORLEVEL 87 GOTO do_this
IF ERRORLEVEL 86 GOTO arc_convert
IF ERRORLEVEL 85 GOTO do_that
REM convert all archive types to ZIP files
REM use maximum compression
SET arc=pkzip -a -ea4 -eb4
REM convert ARC to zip
REM convert PAK to zip
SET unarc=pak e
REM convert ZOO to ZIP
SET unarc=zoo -extract
REM move bad archives to an alternate subdirectory
IF EXIST c:\upload\*.bad move c:\upload\*.bad c:\bad /u
There is one problem with this type of system - what happens to
the descriptions? Some BBS programs automatically place the file
name and description in an ASCII file. If the file is then
converted the filename is changed and would no longer match the
name given with the description.
Archiver Converter Page 5
Thanks to Ken Doebler (1:102/345) for his many suggestions.
PKZIP/PKUNZIP, PKARC/PKXARC, PKPAK/PKUNPAK are copyright PKWare,
Inc. PAK is copyright NoGate Consulting
ZOO is copyright Rahul Dhesi
ABOUT A CERTAIN "OTHER" ARCHIVER
This program has not been tested with a certain archive utility.
I refuse to support "that" company or the policies of that
company. May the to-remain-nameless arrogant asshole who wrote
it go to hell.
We all know who I'm taking about, don't we.
Archiver Converter Page 6