UNZIPOPT

From EDM2
Jump to: navigation, search

Used by Info-ZIP command line programs UnZip and ZipInfo

SET UNZIPOPT=<parameter>
Example
SET UNZIPOPT=-c

Executing UnZip or ZipInfo with -v should show the following output:

...
UnZip and ZipInfo environment options:
           UNZIP:  [none]
        UNZIPOPT:  -c
         ZIPINFO:  [none]
      ZIPINFOOPT:  [none]

Parameters

-Z
zipinfo mode. If the first option on the command line is -Z, the remaining options are taken to be zipinfo options. See the appropriate manual page for a description of these options.
-A
[OS/2, Unix DLL] print extended help for the DLL's programming interface (API).
-c
extract files to stdout/screen ("CRT"). This option is similar to the -p option except that the name of each file is printed as it is extracted, the -a option is allowed, and ASCII-EBCDIC conversion is automatically performed if appropriate. This option is not listed in the unzip usage screen.
-f
freshen existing files, i.e., extract only those files that already exist on disk and that are newer than the disk copies. By default unzip queries before overwriting, but the -o option may be used to suppress the queries. Note that under many operating systems, the TZ (timezone) environment variable must be set correctly in order for -f and -u to work properly (under Unix the variable is usually set automatically). The reasons for this are somewhat subtle but have to do with the differences between DOS-format file times (always local time) and Unix-format times (always in GMT/UTC) and the necessity to compare the two. A typical TZ value is "PST8PDT" (US Pacific time with automatic adjustment for Daylight Savings Time or "summer time").
-l
list archive files (short format). The names, uncompressed file sizes and modification dates and times of the specified files are printed, along with totals for all files specified. If UnZip was compiled with OS2_EAS defined, the -l option also lists columns for the sizes of stored OS/2 extended attributes (EAs) and OS/2 access control lists (ACLs). In addition, the zipfile comment and individual file comments (if any) are displayed. If a file was archived from a single-case file system (for example, the old MS-DOS FAT file system) and the -L option was given, the filename is converted to lowercase and is prefixed with a caret (^).
-p
extract files to pipe (stdout). Nothing but the file data is sent to stdout, and the files are always extracted in binary format, just as they are stored (no conversions).
-t
test archive files. This option extracts each specified file in memory and compares the CRC (cyclic redundancy check, an enhanced checksum) of the expanded file with the original file's stored CRC value.
-T
[most OSes] set the timestamp on the archive(s) to that of the newest file in each one. This corresponds to zip's -go option except that it can be used on wildcard zipfiles (e.g., "unzip -T \*.zip") and is much faster.
-u
update existing files and create new ones if needed. This option performs the same function as the -f option, extracting (with query) files that are newer than those with the same name on disk, and in addition it extracts those files that do not already exist on disk. See -f above for information on setting the timezone properly.
-v
be verbose or print diagnostic version info. This option has evolved and now behaves as both an option and a modifier. As an option it has two purposes: when a zipfile is specified with no other options, -v lists archive files verbosely, adding to the basic -l info the compression method, compressed size, compression ratio and 32-bit CRC. When no zipfile is specified (that is, the complete command is simply unzip -v), a diagnostic screen is printed. In addition to the normal header with release date and version, unzip lists the home Info-ZIP ftp site and where to find a list of other ftp and non-ftp sites; the target operating system for which it was compiled, as well as (possibly) the hardware on which it was compiled, the compiler and version used, and the compilation date; any special compilation options that might affect the program's operation ; and any options stored in environment variables that might do the same. As a modifier it works in conjunction with other options (e.g., -t) to produce more verbose or debugging output; this is not yet fully implemented but will be in future releases.
-z
display only the archive comment.