home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / HR / HR021.ZIP / PKUNZIP.DOC < prev    next >
Text File  |  1990-01-05  |  28KB  |  643 lines

  1.  
  2.                                                                                                                                              |
  3.                                                                        |
  4.                                         PKUNZIP - EXTRACTING ZIP FILES |
  5.                                                                        |
  6.                                       QUICK START - Extract a zip File |
  7.                                                PKUNZIP Reference Guide |
  8.                                         Description of Command Options |
  9.                                                                        |
  10.                                                                        |
  11.                                                                        |
  12.  
  13.  
  14.      PKWARE                           -36-
  15.  
  16.  
  17.  
  18.  
  19.                          QUICK START - EXTRACTING A ZIP FILE
  20.  
  21.  
  22.               This section will describe some simple examples, illustrating
  23.           the command format for extracting files from a ZIP file.
  24.  
  25.           ______________________________________________________________
  26.           |                                                            |
  27.           |                      QUICK START                           |
  28.           |                 How to Extract a ZIP file                  |
  29.           |                                                            |
  30.           | A ZIP file is one which holds much information in a        |
  31.           | greatly reduced space.  Use the PKUNZIP program to         |
  32.           | extract compressed files from a ZIP file.  An entire ZIP   |
  33.           | file can be extracted, or specific files  can be           |
  34.           | delegated to be extracted.                                 |
  35.           |                                                            |
  36.           | There are five main parameters in the PKUNZIP command:     |
  37.           |                                                            |
  38.           | 1. The actual program name          PKUNZIP                |
  39.           |                                                            |
  40.           | 2. The command options (optional)   letter commands        |
  41.           |                                     example: -v=view files |
  42.           |                                                            |
  43.           | 3. The ZIP file name                AnyFile.ZIP            |
  44.           |                                                            |
  45.           | 4. The destination where you want  Default = directory     |
  46.           |    the extracted information to    where program is started|
  47.           |    be located (optional)                                   |
  48.           |                                                            |
  49.           | 5. Selected files to be extracted  Default = *.*           |
  50.           |    (optional)                                              |
  51.           |                                                            |
  52.           |  Examples:                                                 |
  53.           |                                                            |
  54.           |    C:>PKUNZIP  AnyFile.ZIP  A:                             |
  55.           |                                                            |
  56.           | This command will extract all the files in the ZIP file    |
  57.           | AnyFile.ZIP.  It will locate extracted files on the A      |
  58.           | drive.                                                     |
  59.           |                                                            |
  60.           |                                                            |
  61.           |    C:>PKUNZIP  A:AnyFile.ZIP  *.C                          |
  62.           |                                                            |
  63.           | In this example the ZIP file located in the A drive will   |
  64.           | be extracted on the C drive.  The destination is the C     |
  65.           | drive by default.  Only the *.C files will be extracted.   |
  66.           |                                                            |
  67.           |                                                            |
  68.           |    C:>PKUNZIP \Collect\AnyFile.ZIP  A:  -o                 |
  69.           |                                                            |
  70.           |                                                            |
  71.           | In this example, the path location of the ZIP file is      |
  72.           | specified.   The files will be extracted on the A drive.   |
  73.           | With the  -o option, the file with the same name as those  |
  74.           | existing on the A drive, will overwrite the already        |
  75.           | existing files, without asking for user confirmation.      |
  76.           |____________________________________________________________|
  77.  
  78.  
  79.  
  80.  
  81.  
  82.      PKWARE                           -38-
  83.  
  84.  
  85.  
  86.                               PKUNZIP REFERENCE GUIDE
  87.  
  88.  
  89.           The following table will provide a quick reference guide to
  90.           all of the options of PKUNZIP.  The command syntax is also shown
  91.           below.
  92.  
  93.  
  94.           ----------------------------------------------------------------
  95.           |                                                              |
  96.           |                        PKUNZIP                               |
  97.           |                                                              |
  98.           | PKUNZIP [options] zipfile [d:path\] [file...]                |
  99.           |                                                              |
  100.           | zipfile = ZIP file name.  Default extension is .ZIP          |
  101.           | file    = Names of files to compress. Wildcards *, ?  are ok.|
  102.           |           Default is ALL files.                              |
  103.           | list    = An optional list file name.                        |
  104.           |                                                              |
  105.           |                                                              |
  106.           | Options are:                                                 |
  107.           |   -c[m] = Extract files to the screen [with more]            |
  108.           |   -d    = Create directories on extraction from ZIP file     |
  109.           |   -h    = Call up help screen                                |
  110.           |   -j -J<h,r,s> = Mask/Unmask file attributes                 |
  111.           |   -l    = Display license information                        |
  112.           |   -n    = Extract only newer files                           |
  113.           |   -o    = Overwrite existing files                           |
  114.           |   -p[a/b][c][n] = Extract files to the printer               |
  115.           |   -s<password> = Unscrambles files with password protection  |
  116.           |   -t    = Test ZIP file integrity                            |
  117.           |   -q    = Enable ANSI comments                               |
  118.           |   -v[b,r,c,d,e,n,p,s] = View file information                |
  119.           |   -x    = Extract files (the default option)                 |
  120.           |                                                              |
  121.           ----------------------------------------------------------------
  122.  
  123.  
  124.      PKWARE                           -39-
  125.  
  126.  
  127.  
  128.                        DESCRIPTION OF COMMAND OPTIONS
  129.  
  130.  
  131.               The command options used in extracting a ZIP file will be
  132.           explained in detail in this section.  You will find that the new
  133.           command format is much more flexible and easier to use.  Listed
  134.           below is a summary of important facts to keep in mind while using
  135.           PKUNZIP.
  136.  
  137.           - The command options can generally be placed anywhere on the
  138.             command line.
  139.  
  140.           - The first filename listed on the command line will be
  141.             interpreted as the ZIP file to be extracted.  Subsequent
  142.             filenames will be interpreted as specific files to be
  143.             extracted.
  144.  
  145.           - The command can be typed using either upper case, lower
  146.             case, or any combination.
  147.  
  148.           - All command options must be preceded by a '-' character
  149.             (i.e. -v) or the MS-DOS switch character, usually '/'.
  150.  
  151.           - Unlike PKZIP, unrelated options of PKUNZIP cannot be combined.
  152.  
  153.           - The default values for the command line are as follows:
  154.  
  155.           - If no options are entered, the default is -x, the extract
  156.             files option.
  157.  
  158.           - If no extension is specified for the ZIP file the .ZIP
  159.             extension is assumed.
  160.  
  161.           - If no destination is specified for the extracted files, they
  162.             will be located in directory that the program is being run
  163.             from.
  164.  
  165.           - If no file specs (filenames, with or without wildcards) are
  166.             listed, the default is *.*.
  167.  
  168.  
  169.               The following table lists all the options valid with the
  170.           PKZIP command.  A brief summary is also given in the table.  The
  171.           options are explained in detail, along with programming examples,
  172.           following the table.
  173.  
  174.  
  175.  
  176.  
  177.      PKWARE                           -40-
  178.  
  179.  
  180.  
  181.                           Table 4-1   pkunzip Command Options
  182.           --------------------------------------------------------------
  183.  
  184.           OPTION         SUMMARY
  185.  
  186.           -c[m]          Extracts files to the console [with more]
  187.  
  188.           -d             Uses the pathnames stored in the ZIP file and
  189.                          creates the paths on extraction if they do not
  190.                          already exist.
  191.  
  192.           -h             Displays a help screen.
  193.  
  194.           -j -J<h,r,s>   Specifies masking or unmasking of file
  195.                          attributes.
  196.  
  197.           -l             Displays the license agreement.
  198.  
  199.           -n             Extracts files from the ZIP file only if they
  200.                          are newer than the ones already on the disk.
  201.  
  202.           -o             Overwrites existing files without asking for
  203.                          confirmation.
  204.  
  205.           -p[a/b][c][n]  Extracts files to a printer.
  206.  
  207.           -s<password>   Unscrambles the files with password protection.
  208.  
  209.           -t             Tests the ZIP file for corruption.
  210.  
  211.           -q             Enables ANSI comments.
  212.  
  213.           -v[b,r,c,d,e,n,p,s]  Views technical information about
  214.                          files in the ZIP
  215.  
  216.           -x             Extracts files from the ZIP file.
  217.  
  218.  
  219.           Note:  Parameters listed in [ ] are optional.  For parameters
  220.           listed in < >, at least one of the listed parameters must be
  221.           specified.
  222.  
  223.               This section will give a detailed explanation of the command
  224.           options used in the PKUNZIP command.
  225.  
  226.               The command options are explained in groups determined by
  227.           function.  The options pertaining to extracting ZIP files are
  228.           explained first, followed by the view options, print options, and
  229.           miscellaneous options.
  230.  
  231.  
  232.  
  233.      PKWARE                           -41-
  234.  
  235.  
  236.  
  237.           -x  Extract files from a ZIP file
  238.           ---------------------------------
  239.  
  240.               This command will extract files from a ZIP file.  Either the
  241.           entire ZIP file can be extracted or certain files can be
  242.           specified to be extracted.  The extracted files will be located
  243.           in the current directory unless you specify a destination.  The
  244.           -x option is the default option for the PKUNZIP command.  If no
  245.           option is listed on the command  -x will be assumed.
  246.  
  247.               If a file being extracted already exists at the same
  248.           destination where the extracted files are being located, the
  249.           program will prompt you for confirmation before it overwrites the
  250.           existing file.
  251.  
  252.           C:\DB>PKUNZIP -x  A:lists.zip  *.dbf  *.txt
  253.  
  254.               In the above example, all of the files with a .dbf or a .txt
  255.           extension will be extracted from the ZIP file called 'lists'.
  256.           The ZIP file is located on the A drive.  When the noted files are
  257.           extracted, they will be located in the C:\DB directory.
  258.  
  259.  
  260.           -o  Extract files from ZIP file and overwrite existing files
  261.               on disk
  262.           ------------------------------------------------------------
  263.  
  264.               This command will extract files from a ZIP file and
  265.           automatically overwrite any same-named files found in the
  266.           destination where the extracted files are being located.  The
  267.           program will NOT prompt you for confirmation before overwriting
  268.           these files.
  269.  
  270.               Either the entire ZIP file can be extracted or certain files
  271.           can be specified to be extracted.  The extracted files will be
  272.           located in the current directory unless you specify a
  273.           destination.
  274.  
  275.           C:>PKUNZIP  Zfile  *.doc -o
  276.  
  277.  
  278.               In the above example, all of the files with a .doc extension
  279.           will be extracted from the ZIP file called 'Zfile' (the .ZIP
  280.           extension is assumed).  As the files are being extracted any
  281.           files with the same name in the current directory will be
  282.           automatically overwritten.
  283.  
  284.  
  285.  
  286.      PKWARE                           -42-
  287.  
  288.  
  289.  
  290.           -c[m]  Extract files from a ZIP file and display them on the
  291.                  screen
  292.           ------------------------------------------------------------
  293.  
  294.               This command will extract files from a ZIP file and display
  295.           them on the monitor.  The extracted files will scroll
  296.           continuously on the screen.  The software can be told to pause
  297.           after each screen of output by using the -cm (more) option.
  298.  
  299.           A:>PKUNZIP  STUFF  -c  dates.doc
  300.  
  301.               In this example, the file 'dates.doc' will be extracted from
  302.           the noted ZIP file, and displayed on the screen.
  303.  
  304.  
  305.  
  306.           -n  Extract only new files from the ZIP file
  307.           --------------------------------------------
  308.  
  309.               This command will extract files from the ZIP file only if
  310.           they are newer than the same-named ones already on the disk, or
  311.           if they do not already exist on the disk.  This option serves as
  312.           an overwriting safeguard.  It will not allow an older version of
  313.           a file in a ZIP file to overwrite a newer version on disk.
  314.           "Newer" is defined as the most recent time and date created.
  315.  
  316.           C:>PKUNZIP -n  C:\DB\lists  *.dbf
  317.  
  318.               In this example, all of the files with a .dbf extension, that
  319.           are dated more recently than any same-named files on disk, or
  320.           that do not already exist on disk will be extracted from the ZIP
  321.           file 'lists'.
  322.  
  323.  
  324.  
  325.           -t  Test the ZIP file
  326.           ---------------------
  327.  
  328.               This option is used to test the files to make sure they are
  329.           valid and have not been corrupted.  The files will be listed as
  330.           they are being tested 'OK' will listed after each file if it is
  331.           not corrupted.  This option does not extract files from the ZIP
  332.           file; it only tests them.  For instructions on reconstructing a
  333.           ZIP file that has been corrupted, see the section on PKZIPFIX in
  334.           section 5.
  335.  
  336.           C:\WORD\PK> pkunzip  zipdoc  *.doc -t
  337.  
  338.               In the above example all the .DOC files will be tested from
  339.           the ZIP file 'zipdoc'.
  340.  
  341.  
  342.  
  343.      PKWARE                           -43-
  344.  
  345.  
  346.  
  347.           -v[b,r][c,d,e,n,p,s]  View technical information
  348.           ----------------------------------------------------
  349.  
  350.               This option will display technical information concerning the
  351.           files contained within a ZIP file.  There are several options
  352.           available with the View option.  The view options for PKUNZIP are
  353.           the same as those for PKZIP except for -vc.  In PKUNZIP -vc will
  354.           cause the files to be sorted by the 32 bit CRC value.  Also,
  355.           there is no  -vt (view more technical information) option.
  356.  
  357.                The following information about each file in the ZIP file
  358.           will be displayed (scrolled) on the screen.
  359.  
  360.                       Length      Original length of the file
  361.                       Method      Type of file compression used, Implode or
  362.                                   Shrink, (or Reduce if an older version of
  363.                                   PKZIP was used)
  364.                       Size        Size of the compressed file
  365.                       Ratio       Percent reduction in file size
  366.                       Date        Actual date of the file
  367.                       Time        Actual time of the file
  368.                       CRC-32      The CRC-32 value of the file
  369.                       Attribute   The attribute of the file (s=System,
  370.                                   h=Hidden, w=Writable, r=readonly file,
  371.                                   and *=encrypted file)
  372.                       Name        Name of the file
  373.  
  374.  
  375.               The View options for PKUNZIP are explained below.  The
  376.           options determine how the information will be displayed and
  377.           sorted.
  378.  
  379.           The following display options are available:
  380.  
  381.           -vb = The  -b Brief display option will display all the
  382.                 information shown above except the CRC-32 value and the
  383.                 file attribute.
  384.  
  385.           -vr = Display information in reverse order from the default
  386.                 order.  This option is used with any of the sorting
  387.                 options listed below to reverse the order of sorting.
  388.  
  389.  
  390.  
  391.      PKWARE                           -44-
  392.  
  393.  
  394.  
  395.               The following sorting options are available with the View
  396.           option.  The default order of sorting is also specified.  (This
  397.           order can be reversed by using the particular sorting option
  398.           along with the  -vr  View Reverse option.)
  399.  
  400.                -vd = Sort by date of files, oldest to most recent.
  401.                -ve = Sort by file extension, alphabetically.
  402.                -vn = Sort by name of files, alphabetically.
  403.                -vp = Sort by percentage ratio of compression, smallest
  404.                      to largest.
  405.                -vs = Sort by size of files, smallest to largest.
  406.                -vc = Sort by 32 bit CRC value.
  407.  
  408.               If no sorting option is specified, the files will be
  409.           displayed in the order they were compressed.
  410.  
  411.  
  412.               The following command illustrates the View option used to
  413.           display a ZIP file sorted by name.  The output display is shown
  414.           below.
  415.  
  416.           D:> PKUNZIP backups.zip   -vn
  417.  
  418.  
  419.        Length  Method   Size  Ratio   Date    Time   CRC-32  Attr  Name
  420.        ------  ------   ----- -----   ----    ----   ------  ----  ----
  421.         10752  Implode   3933  64%  07-06-89  19:23  426c896a --w  AGO.BAK
  422.         25600  Implode   8525  67%  07-13-89  17:55  bacc8813 --w  DM1.BAK
  423.         41984  Implode  13320  69%  07-10-89  21:36  b20889a9 --w  DM2.BAK
  424.         26112  Implode   8470  68%  07-11-89  18:53  eb623405 --w  DM3.BAK
  425.         16896  Implode   6153  64%  07-10-89  20:52  05d3ba41 --w  DM4.BAK
  426.         28601  Implode   8602  70%  07-13-89  18:49  c0bd9829 --w  EM4.BAK
  427.          7168  Implode   2456  66%  01-04-80  14:57  007c1270 --w  EXE.BAK
  428.          4608  Implode   1906  59%  06-28-89  23:35  d70bcf7e --w  FMAL.BAK
  429.          6656  Implode   1926  72%  06-28-89  13:00  7447224b --w  PK.BAK
  430.          3072  Implode   1181  62%  06-28-89  16:59  597bade0 --w  PK1.BAK
  431.          6144  Implode   2350  62%  01-04-80  13:48  96bb2322 --w  SAVE.BAK
  432.          1240  Implode    754  40%  07-10-89  11:23  8899969f --w  TEEN.BAK
  433.          8704  Implode   3504  60%  06-29-89  19:26  760cc345 --w  TIAL.BAK
  434.         26624  Implode   8495  69%  06-29-89  00:16  8849114b --w  TZIP.BAK
  435.         38400  Implode  12080  69%  06-29-89  18:31  53619fb8 --w  VZIP.BAK
  436.           927  Implode    502  46%  07-17-89  18:31  61b90c8f --w  WIEW.BAK
  437.           319  Shrunk     246  23%  07-17-89  18:33  045dda73 --w  XXXZ.BAK
  438.        ------          ------  ---                                -------
  439.        253807           84403  67%                                     17
  440.  
  441.  
  442.      PKWARE                           -45-
  443.  
  444.  
  445.  
  446.           -p[a/b][c][n]  Extract files to a printer
  447.           -----------------------------------------
  448.  
  449.               This option is used to extract files from a ZIP file and send
  450.           them to a printer for printing.  The command parameters are
  451.           defined below.  The parameters of the print option must be
  452.           programmed together on the command line.  (i.e. -pac1 is correct,
  453.           -p -a -c1 is NOT correct.)
  454.  
  455.            -p   Specifies the extract to printer option.
  456.  
  457.           a/b   The a and b parameters will set the printer device to
  458.                 either ASCII or Binary mode respectively.  If no mode
  459.                 is specified, whatever the default mode is for the
  460.                 device will be used.
  461.  
  462.                 ASCII mode is commonly used to print text.  It will
  463.                 form feed after each file.
  464.  
  465.                 Binary mode corresponds to the COPY command commonly
  466.                 used to send fonts or graphics to a laser printer.  It
  467.                 will not form feed after each file.
  468.  
  469.                 The a and b options cannot be mixed in the same
  470.                 command.
  471.  
  472.             c   This option specifies the port that the data should be
  473.                 sent through.   If c is included in the print option,
  474.                 this specifies a serial (COM) port is to be used.  If c
  475.                 is NOT included in the print option, this indicates a
  476.                 parallel (LPT) port is to be used.
  477.  
  478.             n   This is the number of the print port being used.  It can
  479.                 be any number from 1 to 4.  If no number is listed, 1 is
  480.                 assumed by default.
  481.  
  482.           C:>PKUNZIP -pbc2  PICTURE.ZIP
  483.  
  484.               In the above example, the files compressed in the ZIP file
  485.           'PICTURE' will be extracted and printed in binary mode to the
  486.           serial port COM2.
  487.  
  488.           C:>PKUNZIP  stuff *.doc -p
  489.  
  490.               In the above example, all the .DOC files will be extracted
  491.           from STUFF.ZIP to the parallel port LPT1.
  492.  
  493.  
  494.  
  495.      PKWARE                           -46-
  496.  
  497.  
  498.  
  499.           -d  Recreate directory paths upon extraction
  500.           --------------------------------------------
  501.  
  502.               This command option uses the pathnames that have been stored
  503.           in the ZIP file.  The directory pathnames are stored in the ZIP
  504.           file by the use of  -p, -P and -r options in the list of PKZIP
  505.           commands explained in Section 3.  If the stored output paths do
  506.           not exist at the extraction destination, this command will create
  507.           them as they are stored in the ZIP file.
  508.  
  509.           For example:  If the following directory tree exists on drive C.
  510.  
  511.                root----+-abc--+-dir1
  512.                        |      |
  513.                        |      +-dir2-+-dir3
  514.                        |             |
  515.                        +-xyz--       +-dir4
  516.                        |
  517.                        +-pdq
  518.  
  519.  
  520.           If you then executed: PKZIP -r -p  A:STUFF  C:\abc\*.*
  521.  
  522.           If you then executed: PKUNZIP  -d  A:STUFF  C:\pdq\newabc
  523.  
  524.           After the PKUNZIP command is processed, the C drive would then
  525.           look like this:
  526.  
  527.                root----+-abc--+-dir1
  528.                        |      |
  529.                        |      +-dir2-+-dir3
  530.                        |             |
  531.                        +-xyz--       +-dir4
  532.                        |
  533.                        +-pdq--+-newabc-+-dir1
  534.                                        |
  535.                                        +-dir2-+-dir3
  536.                                               |
  537.                                               +-dir4
  538.  
  539.  
  540.               All of the files originally in C:\ABC and its subdirectories
  541.           (dir1, dir2, dir3, and dir4) have been restored to C:\PDQ\NEWABC,
  542.           with the directory tree being recreated.
  543.  
  544.               If this -d option is not specified and pathnames have been
  545.           stored in the ZIP file, only the filenames stored in the ZIP file
  546.           will be used, any pathnames will be ignored.
  547.  
  548.  
  549.      PKWARE                           -47-
  550.  
  551.  
  552.  
  553.           -h  Display help screen
  554.           -----------------------
  555.  
  556.               This command will display a help screen whenever typed on the
  557.           command line.  The help screen will also occur when a command has
  558.           been entered incorrectly.
  559.  
  560.           D:\PKWARE> PKZIP -h
  561.  
  562.  
  563.  
  564.           -l  Display the License screen
  565.           ------------------------------
  566.  
  567.               This command will display the software license agreement.
  568.  
  569.  
  570.  
  571.           -q   Enable ANSI Comments
  572.           --------------------------
  573.  
  574.               By default, ANSI sequences are filtered from the comments.
  575.           This option allows any ANSI sequences to be displayed
  576.           unfiltered.
  577.  
  578.  
  579.           C:\ACCT> PKUNZIP ACCT.ZIP -o -q
  580.  
  581.               In this example, the ZIP file will be uncompressed
  582.           (overwriting files existing on disk) and the ANSI comments of the
  583.           file being extracted will be enabled.
  584.  
  585.  
  586.  
  587.           -j<H,S,R>  Mask hidden, system or readonly file attributes
  588.           -J<H,S,R>  Do not mask hidden, system or readonly file
  589.                      attributes
  590.           ----------------------------------------------------------
  591.  
  592.               This option is used to mask the hidden, system or readonly
  593.           attributes of files so that they will be treated as normal
  594.           writable files.  By default hidden, system, and readonly
  595.           attributes are masked off upon extraction.  To preserve these
  596.           attributes, the -J option must be used.
  597.  
  598.  
  599.           C:\DOS> PKUNZIP ALL.ZIP -Jhs
  600.  
  601.               In this example, any hidden or system file attributes of the
  602.           files being extracted will be preserved.
  603.  
  604.  
  605.           NOTE:  There is no space between the J or j, and the h, s or r.
  606.  
  607.  
  608.  
  609.      PKWARE                           -48-
  610.  
  611.  
  612.  
  613.           -s<password>  Unscramble files with password
  614.           --------------------------------------------
  615.  
  616.               This option is used to unscramble, or decrypt the files in
  617.           the ZIP file.  It is used in combination with the  -s Scramble
  618.           option of the Zip options.  It includes password protection.
  619.  
  620.               When Unzipping a ZIP file that has been encrypted, the files
  621.           will not be extracted unless the correct password is included on
  622.           the command line.  Unzip skips encrypted files if the password is
  623.           not stated on the command line.
  624.  
  625.               When specifying the password, there is no space between the
  626.           s and the password.  Also the password is case sensitive.  It
  627.           must be entered exactly the same as when you zipped the file.  It
  628.           is important that you remember or somehow record the passwords
  629.           that you use, because PKZIP does not retain a record of these
  630.           passwords anywhere.
  631.  
  632.           C:\FINANCE> PKUNZIP PAYROLL -o -sSecret  *.pyr
  633.  
  634.               In the above example, all of the files with a *.pyr extension
  635.           will be extracted from the ZIP file 'PAYROLL'.  In this case the
  636.           password specified when the file was zipped, was 'Secret'.
  637.  
  638.  
  639.  
  640.  
  641.      PKWARE                           -49-
  642.  
  643.