The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


2LZH - Automatic archive conversion

Summary

2LZH converts .ZOO, .ZIP, .ARC and .ARJ files to .LZH files. Unless otherwise specified, it automatically searches for files on the current drive.

Icon

Command Line Format

Usage: 2LZH {Switches} <Drive Spec(s)> File Spec

Switches

-a
All disks.
-c
Compact mode; keeps the smaller of the compressed files.
-f
Modify Fidonet style FILES.BBS files.
-h
Hard disks only.
-iPath
Use path to find 2LZH.INI.
-l
Keep a Log file.
-n
No recursion.
-o
Old (-lh1-) compatibility mode.
-p
Preserve original archive time and date.
-r
Repack *.LZH files.
-s
List file Statistics.
-u
Update mode; replace duplicates.
-v
Virus scan unpacked files.

Description

2LZH automatically scans the specified disk and converts all .ARJ, .ZIP and .ZOO archives found into .LZH format. Peter Fitzsimmon's LH program is an OS/2 version of the DOS LHA and LHARC programs. It fully supports HPFS long file names and extended attributes.

If told to, 2LZH will convert a specific file. The default mode is to convert all archives.

2LZH can also convert nested archives, as well as archives with paths stored in them.

For 2LZH to successfully convert the archives which it encounters, there needs to be sufficient disk space to hold the files in the archive in their unpacked state.

-a All disks

2LZH will scan all logical disk drives defined by the system, starting at drive A:. The drives are scanned in order, starting at A:, then B: and so on.

-c Compact mode; keeps the smaller of the compressed files

In this mode, 2LZH will look at the file sizes of the original archive as well as the new LZH archive. It will keep the smaller of the two.

-f Modify Fidonet style FILES.BBS files

This switch is primarily of interest to BBS operators. It looks for a file "FILES.BBS" in the directory which the original archive was in. If the file is successfully converted, 2LZH will convert the old file name to the new file name in FILES.BBS - if it exists.

-h Hard disks only

2LZH will scan all logical disk drives defined by the system, starting at drive C:. The drives are scanned in order, starting at C:, then D: and so on.

-i Use path to find 2LZH.INI

By default 2LZH uses the GU environment variable to locate the 2LZH.INI file. Alternatively you may use this switch to specify a different path to locate the 2LZH.INI file. If 2LZH.INI is not found, 2LZH will attempt to continue with default values. The default values are the same as those specified in the 2LZH.INI file. The 2LZH.INI file is provided so that you may configure the operation of 2LZH. See Appendix C for complete details.

-l Keep a Log file

2LZH will keep a log file of all important events, as well as the date and time at which they occurred. If the statistics switch is given, they are also recorded in the log file. The log file, 2LZH.LOG, is saved in the directory from which 2LZH is started.

-n No recursion

2LZH will NOT recursively search your disk directory structure. This is so that you can convert only one particular subdirectory.

-o Old (-lh1-) compatibility mode

By default LH uses the newer -lh5- format which gives better compression than the original -lh1- format. Use this switch to force LH to revert to the older format.

-p Preserve original archive time and date

By default, 2LZH will create an archive with the current date and time. This switch sets the new archive to the original archive's date and time.

-r Repack *.LZH files

By default 2LZH will not convert the already existing .LZH archives. Use this switch if you wish to repack the existing LZH files. It is most useful when converting archives between -lh1- and -lh5- formats. To convert new format (-lh5-) archives to the old (-lh1-) format, combine the -r and -o switches together. To update old format archives to the new format, only specify the -r switch.

-s List file Statistics

This switch will force 2LZH to display the file statistics of the converted archives. It lists the number of archives converted and the total size reduction from the old to new archive sizes. If the -l switch is given, the statistics are also recorded in the log file.

-u Update mode; replace duplicates

By default, if 2LZH attempts to convert an archive and there is already a .LZH file of the same name there, the conversion of that archive will be aborted. This update mode switch forces 2LZH to delete the original .LZH file (if present) first, and then convert the other archive.

-v Virus scan unpacked files

This switch forces 2LZH to virus scan the files when they are in their unpacked state. It will report any errors and if any viruses were found abort the archive conversion. See Appendix C for further details on how to configure the operation of the virus scanning software.

Examples

2LZH
This is the simplest way in which 2LZH can be called. It will convert all archives found on the current drive to LZH format.
2LZH -flspu
This combination of switches causes 2LZH to modify a FILES.BBS file if one is found, to keep a log file, to report on (and log) statistics, and to preserve the original archive's time and date. In addition, any duplicate files will be replaced with the newly repacked archive.
2LZH -flsp H:\Max\File\S_Upload\*.ZIP
This will cause 2LZH to convert all ZIP files in H:\Max\File\S_Upload to LZH format. In addition, FILES.BBS is modified, a log file is created, file statistics are noted and the original date and time are kept.
2LZH -flsph
This will convert all archives found on all hard disks. 2LZH will also modify a FILES.BBS file if one is found, keep a log file, report on (and log) statistics, and preserve the original archive's time and date.
2LZH -rv
2LZH will repack all LZH files on the current drive into the newer, smaller -lh5- format. At the same time it will also convert all of the other archive formats. When unpacked, the files within the archives will be scanned for viruses.
2LZH -ro
2LZH will repack all LZH files on the current drive into the older, larger -lh1- format. At the same time it will also convert all of the other archive formats to -lh1- format.
2LZH -flspiC:\GU20
2LZH will modify a FILES.BBS file if one is found, keep a log file, report on (and log) statistics, and preserve the original archive's time and date. The 2LZH.INI file in directory C:\GU20 will be used.

FILES.BBS files

The FILES.BBS file is used by some FidoNet style BBS programs to store the names and comments of the files which are available to BBS users. Maximus and Opus are examples of BBS programs which use the FILES.BBS format. Other BBS programs may use different formats to store their file lists.

The FILES.BBS file simply contains the file name followed by the comments for that file.

A sample of a FILES.BBS before 2LZH has processed it may look like this:

-    The archived archive programs themselves
PKZ102-2.ZIP (  1)OS/2 version of PKZip 1.02
ZOO21E.ZIP   (  2)OS/2 version of ZOO.EXE (2.1) and
source
UNZ50X32.ZIP ( 35)OS/2 32 bit UnZip supports new deflation

ZIP19X32.ZIP ( 40)OS/2 32 bit Zip supports new deflation UNARJ.ZIP ( 1)OS/2 Demo version of UnARJ GZIPTAR.ZIP ( )OS/2 GZIP and TAR executables (and DLLs)

The same file after 2LZH has modified it would look like this:
-    The archived archive programs themselves
PKZ102-2.LZH (  1)OS/2 version of PKZip 1.02
ZOO21E.LZH   (  2)OS/2 version of ZOO.EXE (2.1) and
source
UNZ50X32.LZH ( 35)OS/2 32 bit UnZip supports new deflation
ZIP19X32.LZH ( 40)OS/2 32 bit Zip supports new deflation
UNARJ.LZH    (  1)OS/2 Demo version of UnARJ
GZIPTAR.LZH  (   )OS/2 GZIP and TAR executables (and DLLs)