home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
HR
/
HR021.ZIP
/
PKUNZIP.DOC
< prev
next >
Wrap
Text File
|
1990-01-05
|
28KB
|
643 lines
|
|
PKUNZIP - EXTRACTING ZIP FILES |
|
QUICK START - Extract a zip File |
PKUNZIP Reference Guide |
Description of Command Options |
|
|
|
PKWARE -36-
QUICK START - EXTRACTING A ZIP FILE
This section will describe some simple examples, illustrating
the command format for extracting files from a ZIP file.
______________________________________________________________
| |
| QUICK START |
| How to Extract a ZIP file |
| |
| A ZIP file is one which holds much information in a |
| greatly reduced space. Use the PKUNZIP program to |
| extract compressed files from a ZIP file. An entire ZIP |
| file can be extracted, or specific files can be |
| delegated to be extracted. |
| |
| There are five main parameters in the PKUNZIP command: |
| |
| 1. The actual program name PKUNZIP |
| |
| 2. The command options (optional) letter commands |
| example: -v=view files |
| |
| 3. The ZIP file name AnyFile.ZIP |
| |
| 4. The destination where you want Default = directory |
| the extracted information to where program is started|
| be located (optional) |
| |
| 5. Selected files to be extracted Default = *.* |
| (optional) |
| |
| Examples: |
| |
| C:>PKUNZIP AnyFile.ZIP A: |
| |
| This command will extract all the files in the ZIP file |
| AnyFile.ZIP. It will locate extracted files on the A |
| drive. |
| |
| |
| C:>PKUNZIP A:AnyFile.ZIP *.C |
| |
| In this example the ZIP file located in the A drive will |
| be extracted on the C drive. The destination is the C |
| drive by default. Only the *.C files will be extracted. |
| |
| |
| C:>PKUNZIP \Collect\AnyFile.ZIP A: -o |
| |
| |
| In this example, the path location of the ZIP file is |
| specified. The files will be extracted on the A drive. |
| With the -o option, the file with the same name as those |
| existing on the A drive, will overwrite the already |
| existing files, without asking for user confirmation. |
|____________________________________________________________|
PKWARE -38-
PKUNZIP REFERENCE GUIDE
The following table will provide a quick reference guide to
all of the options of PKUNZIP. The command syntax is also shown
below.
----------------------------------------------------------------
| |
| PKUNZIP |
| |
| PKUNZIP [options] zipfile [d:path\] [file...] |
| |
| zipfile = ZIP file name. Default extension is .ZIP |
| file = Names of files to compress. Wildcards *, ? are ok.|
| Default is ALL files. |
| list = An optional list file name. |
| |
| |
| Options are: |
| -c[m] = Extract files to the screen [with more] |
| -d = Create directories on extraction from ZIP file |
| -h = Call up help screen |
| -j -J<h,r,s> = Mask/Unmask file attributes |
| -l = Display license information |
| -n = Extract only newer files |
| -o = Overwrite existing files |
| -p[a/b][c][n] = Extract files to the printer |
| -s<password> = Unscrambles files with password protection |
| -t = Test ZIP file integrity |
| -q = Enable ANSI comments |
| -v[b,r,c,d,e,n,p,s] = View file information |
| -x = Extract files (the default option) |
| |
----------------------------------------------------------------
PKWARE -39-
DESCRIPTION OF COMMAND OPTIONS
The command options used in extracting a ZIP file will be
explained in detail in this section. You will find that the new
command format is much more flexible and easier to use. Listed
below is a summary of important facts to keep in mind while using
PKUNZIP.
- The command options can generally be placed anywhere on the
command line.
- The first filename listed on the command line will be
interpreted as the ZIP file to be extracted. Subsequent
filenames will be interpreted as specific files to be
extracted.
- The command can be typed using either upper case, lower
case, or any combination.
- All command options must be preceded by a '-' character
(i.e. -v) or the MS-DOS switch character, usually '/'.
- Unlike PKZIP, unrelated options of PKUNZIP cannot be combined.
- The default values for the command line are as follows:
- If no options are entered, the default is -x, the extract
files option.
- If no extension is specified for the ZIP file the .ZIP
extension is assumed.
- If no destination is specified for the extracted files, they
will be located in directory that the program is being run
from.
- If no file specs (filenames, with or without wildcards) are
listed, the default is *.*.
The following table lists all the options valid with the
PKZIP command. A brief summary is also given in the table. The
options are explained in detail, along with programming examples,
following the table.
PKWARE -40-
Table 4-1 pkunzip Command Options
--------------------------------------------------------------
OPTION SUMMARY
-c[m] Extracts files to the console [with more]
-d Uses the pathnames stored in the ZIP file and
creates the paths on extraction if they do not
already exist.
-h Displays a help screen.
-j -J<h,r,s> Specifies masking or unmasking of file
attributes.
-l Displays the license agreement.
-n Extracts files from the ZIP file only if they
are newer than the ones already on the disk.
-o Overwrites existing files without asking for
confirmation.
-p[a/b][c][n] Extracts files to a printer.
-s<password> Unscrambles the files with password protection.
-t Tests the ZIP file for corruption.
-q Enables ANSI comments.
-v[b,r,c,d,e,n,p,s] Views technical information about
files in the ZIP
-x Extracts files from the ZIP file.
Note: Parameters listed in [ ] are optional. For parameters
listed in < >, at least one of the listed parameters must be
specified.
This section will give a detailed explanation of the command
options used in the PKUNZIP command.
The command options are explained in groups determined by
function. The options pertaining to extracting ZIP files are
explained first, followed by the view options, print options, and
miscellaneous options.
PKWARE -41-
-x Extract files from a ZIP file
---------------------------------
This command will extract files from a ZIP file. Either the
entire ZIP file can be extracted or certain files can be
specified to be extracted. The extracted files will be located
in the current directory unless you specify a destination. The
-x option is the default option for the PKUNZIP command. If no
option is listed on the command -x will be assumed.
If a file being extracted already exists at the same
destination where the extracted files are being located, the
program will prompt you for confirmation before it overwrites the
existing file.
C:\DB>PKUNZIP -x A:lists.zip *.dbf *.txt
In the above example, all of the files with a .dbf or a .txt
extension will be extracted from the ZIP file called 'lists'.
The ZIP file is located on the A drive. When the noted files are
extracted, they will be located in the C:\DB directory.
-o Extract files from ZIP file and overwrite existing files
on disk
------------------------------------------------------------
This command will extract files from a ZIP file and
automatically overwrite any same-named files found in the
destination where the extracted files are being located. The
program will NOT prompt you for confirmation before overwriting
these files.
Either the entire ZIP file can be extracted or certain files
can be specified to be extracted. The extracted files will be
located in the current directory unless you specify a
destination.
C:>PKUNZIP Zfile *.doc -o
In the above example, all of the files with a .doc extension
will be extracted from the ZIP file called 'Zfile' (the .ZIP
extension is assumed). As the files are being extracted any
files with the same name in the current directory will be
automatically overwritten.
PKWARE -42-
-c[m] Extract files from a ZIP file and display them on the
screen
------------------------------------------------------------
This command will extract files from a ZIP file and display
them on the monitor. The extracted files will scroll
continuously on the screen. The software can be told to pause
after each screen of output by using the -cm (more) option.
A:>PKUNZIP STUFF -c dates.doc
In this example, the file 'dates.doc' will be extracted from
the noted ZIP file, and displayed on the screen.
-n Extract only new files from the ZIP file
--------------------------------------------
This command will extract files from the ZIP file only if
they are newer than the same-named ones already on the disk, or
if they do not already exist on the disk. This option serves as
an overwriting safeguard. It will not allow an older version of
a file in a ZIP file to overwrite a newer version on disk.
"Newer" is defined as the most recent time and date created.
C:>PKUNZIP -n C:\DB\lists *.dbf
In this example, all of the files with a .dbf extension, that
are dated more recently than any same-named files on disk, or
that do not already exist on disk will be extracted from the ZIP
file 'lists'.
-t Test the ZIP file
---------------------
This option is used to test the files to make sure they are
valid and have not been corrupted. The files will be listed as
they are being tested 'OK' will listed after each file if it is
not corrupted. This option does not extract files from the ZIP
file; it only tests them. For instructions on reconstructing a
ZIP file that has been corrupted, see the section on PKZIPFIX in
section 5.
C:\WORD\PK> pkunzip zipdoc *.doc -t
In the above example all the .DOC files will be tested from
the ZIP file 'zipdoc'.
PKWARE -43-
-v[b,r][c,d,e,n,p,s] View technical information
----------------------------------------------------
This option will display technical information concerning the
files contained within a ZIP file. There are several options
available with the View option. The view options for PKUNZIP are
the same as those for PKZIP except for -vc. In PKUNZIP -vc will
cause the files to be sorted by the 32 bit CRC value. Also,
there is no -vt (view more technical information) option.
The following information about each file in the ZIP file
will be displayed (scrolled) on the screen.
Length Original length of the file
Method Type of file compression used, Implode or
Shrink, (or Reduce if an older version of
PKZIP was used)
Size Size of the compressed file
Ratio Percent reduction in file size
Date Actual date of the file
Time Actual time of the file
CRC-32 The CRC-32 value of the file
Attribute The attribute of the file (s=System,
h=Hidden, w=Writable, r=readonly file,
and *=encrypted file)
Name Name of the file
The View options for PKUNZIP are explained below. The
options determine how the information will be displayed and
sorted.
The following display options are available:
-vb = The -b Brief display option will display all the
information shown above except the CRC-32 value and the
file attribute.
-vr = Display information in reverse order from the default
order. This option is used with any of the sorting
options listed below to reverse the order of sorting.
PKWARE -44-
The following sorting options are available with the View
option. The default order of sorting is also specified. (This
order can be reversed by using the particular sorting option
along with the -vr View Reverse option.)
-vd = Sort by date of files, oldest to most recent.
-ve = Sort by file extension, alphabetically.
-vn = Sort by name of files, alphabetically.
-vp = Sort by percentage ratio of compression, smallest
to largest.
-vs = Sort by size of files, smallest to largest.
-vc = Sort by 32 bit CRC value.
If no sorting option is specified, the files will be
displayed in the order they were compressed.
The following command illustrates the View option used to
display a ZIP file sorted by name. The output display is shown
below.
D:> PKUNZIP backups.zip -vn
Length Method Size Ratio Date Time CRC-32 Attr Name
------ ------ ----- ----- ---- ---- ------ ---- ----
10752 Implode 3933 64% 07-06-89 19:23 426c896a --w AGO.BAK
25600 Implode 8525 67% 07-13-89 17:55 bacc8813 --w DM1.BAK
41984 Implode 13320 69% 07-10-89 21:36 b20889a9 --w DM2.BAK
26112 Implode 8470 68% 07-11-89 18:53 eb623405 --w DM3.BAK
16896 Implode 6153 64% 07-10-89 20:52 05d3ba41 --w DM4.BAK
28601 Implode 8602 70% 07-13-89 18:49 c0bd9829 --w EM4.BAK
7168 Implode 2456 66% 01-04-80 14:57 007c1270 --w EXE.BAK
4608 Implode 1906 59% 06-28-89 23:35 d70bcf7e --w FMAL.BAK
6656 Implode 1926 72% 06-28-89 13:00 7447224b --w PK.BAK
3072 Implode 1181 62% 06-28-89 16:59 597bade0 --w PK1.BAK
6144 Implode 2350 62% 01-04-80 13:48 96bb2322 --w SAVE.BAK
1240 Implode 754 40% 07-10-89 11:23 8899969f --w TEEN.BAK
8704 Implode 3504 60% 06-29-89 19:26 760cc345 --w TIAL.BAK
26624 Implode 8495 69% 06-29-89 00:16 8849114b --w TZIP.BAK
38400 Implode 12080 69% 06-29-89 18:31 53619fb8 --w VZIP.BAK
927 Implode 502 46% 07-17-89 18:31 61b90c8f --w WIEW.BAK
319 Shrunk 246 23% 07-17-89 18:33 045dda73 --w XXXZ.BAK
------ ------ --- -------
253807 84403 67% 17
PKWARE -45-
-p[a/b][c][n] Extract files to a printer
-----------------------------------------
This option is used to extract files from a ZIP file and send
them to a printer for printing. The command parameters are
defined below. The parameters of the print option must be
programmed together on the command line. (i.e. -pac1 is correct,
-p -a -c1 is NOT correct.)
-p Specifies the extract to printer option.
a/b The a and b parameters will set the printer device to
either ASCII or Binary mode respectively. If no mode
is specified, whatever the default mode is for the
device will be used.
ASCII mode is commonly used to print text. It will
form feed after each file.
Binary mode corresponds to the COPY command commonly
used to send fonts or graphics to a laser printer. It
will not form feed after each file.
The a and b options cannot be mixed in the same
command.
c This option specifies the port that the data should be
sent through. If c is included in the print option,
this specifies a serial (COM) port is to be used. If c
is NOT included in the print option, this indicates a
parallel (LPT) port is to be used.
n This is the number of the print port being used. It can
be any number from 1 to 4. If no number is listed, 1 is
assumed by default.
C:>PKUNZIP -pbc2 PICTURE.ZIP
In the above example, the files compressed in the ZIP file
'PICTURE' will be extracted and printed in binary mode to the
serial port COM2.
C:>PKUNZIP stuff *.doc -p
In the above example, all the .DOC files will be extracted
from STUFF.ZIP to the parallel port LPT1.
PKWARE -46-
-d Recreate directory paths upon extraction
--------------------------------------------
This command option uses the pathnames that have been stored
in the ZIP file. The directory pathnames are stored in the ZIP
file by the use of -p, -P and -r options in the list of PKZIP
commands explained in Section 3. If the stored output paths do
not exist at the extraction destination, this command will create
them as they are stored in the ZIP file.
For example: If the following directory tree exists on drive C.
root----+-abc--+-dir1
| |
| +-dir2-+-dir3
| |
+-xyz-- +-dir4
|
+-pdq
If you then executed: PKZIP -r -p A:STUFF C:\abc\*.*
If you then executed: PKUNZIP -d A:STUFF C:\pdq\newabc
After the PKUNZIP command is processed, the C drive would then
look like this:
root----+-abc--+-dir1
| |
| +-dir2-+-dir3
| |
+-xyz-- +-dir4
|
+-pdq--+-newabc-+-dir1
|
+-dir2-+-dir3
|
+-dir4
All of the files originally in C:\ABC and its subdirectories
(dir1, dir2, dir3, and dir4) have been restored to C:\PDQ\NEWABC,
with the directory tree being recreated.
If this -d option is not specified and pathnames have been
stored in the ZIP file, only the filenames stored in the ZIP file
will be used, any pathnames will be ignored.
PKWARE -47-
-h Display help screen
-----------------------
This command will display a help screen whenever typed on the
command line. The help screen will also occur when a command has
been entered incorrectly.
D:\PKWARE> PKZIP -h
-l Display the License screen
------------------------------
This command will display the software license agreement.
-q Enable ANSI Comments
--------------------------
By default, ANSI sequences are filtered from the comments.
This option allows any ANSI sequences to be displayed
unfiltered.
C:\ACCT> PKUNZIP ACCT.ZIP -o -q
In this example, the ZIP file will be uncompressed
(overwriting files existing on disk) and the ANSI comments of the
file being extracted will be enabled.
-j<H,S,R> Mask hidden, system or readonly file attributes
-J<H,S,R> Do not mask hidden, system or readonly file
attributes
----------------------------------------------------------
This option is used to mask the hidden, system or readonly
attributes of files so that they will be treated as normal
writable files. By default hidden, system, and readonly
attributes are masked off upon extraction. To preserve these
attributes, the -J option must be used.
C:\DOS> PKUNZIP ALL.ZIP -Jhs
In this example, any hidden or system file attributes of the
files being extracted will be preserved.
NOTE: There is no space between the J or j, and the h, s or r.
PKWARE -48-
-s<password> Unscramble files with password
--------------------------------------------
This option is used to unscramble, or decrypt the files in
the ZIP file. It is used in combination with the -s Scramble
option of the Zip options. It includes password protection.
When Unzipping a ZIP file that has been encrypted, the files
will not be extracted unless the correct password is included on
the command line. Unzip skips encrypted files if the password is
not stated on the command line.
When specifying the password, there is no space between the
s and the password. Also the password is case sensitive. It
must be entered exactly the same as when you zipped the file. It
is important that you remember or somehow record the passwords
that you use, because PKZIP does not retain a record of these
passwords anywhere.
C:\FINANCE> PKUNZIP PAYROLL -o -sSecret *.pyr
In the above example, all of the files with a *.pyr extension
will be extracted from the ZIP file 'PAYROLL'. In this case the
password specified when the file was zipped, was 'Secret'.
PKWARE -49-