Dec 282017
Convert archives to ZIP format. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CONVERT.DOC | 11600 | 3798 | deflated |
CONVERT.EXE | 16032 | 9016 | deflated |
Download File CONVERT2.ZIP Here
Contents of the CONVERT.DOC file
Archive Convert Version 2.0
Copyright (c)1989 Ross Neilson Wentworth
All Rights Reserved
LICENSE
=======
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
(213)399-1244
The lastest version of this program can be found on TORRANCE BBS,
(213)370-9027 (6pm-9am weekdays, all weekend), Fido/Opus address
1:102/345.
DESCRIPTION
===========
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
painlessly.
The program doesn't actually do any conversion on its own.
Rather, it acts as a shell around the four archivers - automating
the process.
The four utilities supported are:
PKZIP/PKUNZIP
PKARC/PKXARC (a.k.a. PKPAK/PKUNPAK)
ZOO
PAK
Other formats MAY work but there is no guarantee.
ENVIRONMENT VARIABLES
=====================
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
ARC=PKARC -A
ARC=PKPAK -A
ARC=PAK A
ARC=ZOO -ADD
Suggested UNARC settings:
UNARC=PKUNZIP
UNARC=PKXARC
UNARC=PKUNPAK
UNARC=PAK E
UNARC=ZOO -EXTRACT
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:
PKZIP/PKUNZIP 0.9
PKPAK/PKUNPAK 3.61
PAK 1.6
ZOO 2.01
FILENAME EXTENSIONS
===================
There are limitations to the filename extension of the newly
created archive.
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:
CONVERT *.ZOO
CONVERT \UPLOADS\AFILE.ZIP
This is NOT allowed:
CONVERT *.*
TIME/DATE STAMP
===============
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
make modifications.
NESTED ARCHIVES
===============
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.
CORRUPTED ARCHIVES
==================
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
version 1.6.
FUTURE ENHANCEMENTS
===================
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
default) subdirectory.
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
:arc_convert
REM use maximum compression
SET arc=pkzip -a -ea4 -eb4
REM convert ARC to zip
SET unarc=pkxarc
convert c:\uploads\*.arc
REM convert PAK to zip
SET unarc=pak e
convert c:\uploads\*.pak
REM convert ZOO to ZIP
SET unarc=zoo -extract
convert c:\uploads\*.zoo
REM move bad archives to an alternate subdirectory
IF EXIST c:\upload\*.bad move c:\upload\*.bad c:\bad /u
GOTO run_fd
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
ACKNOWLEDGEMENTS
================
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
December 28, 2017
Add comments