|Purpose:||Add, update, or delete files in a .ZIP archive|
|Format:||ZIP [/= /A:[[-][+]rhsdaecjot] /A /C /CRC /D /En /F /G /I /Ln /M /O:[-]adegnrstu /P /Q /R /S"password" /T /TEST /U /V /YC /Z"text"] ziparchive [@file] file...|
|ziparchive||The zip file to work with|
|file||The files(s) to be added to the zip file|
See also UNZIP.
You can specify a pathname for ziparchive. If you don't provide an extension, and the filename as entered doesn't exist, ZIP adds ".zip". If you don't specify an operation, ZIP will default to Add. If you don't specify any arguments, ZIP will display its command dialog.
ZIP will automatically use the Zip64 extensions if the archive is in Zip64 format.
ZIP supports connected web folders. If an HTML file (i.e., with an .htm or .html extension) is zipped, ZIP will look for a folder in the same directory with the same name and an extension of ".files". If it is found, the .files directory will be added to the ZIP archive.
ZIP sets two internal variables:
|%_zip_files||The number of files archived|
|%_zip_errors||The number of errors|
|/A:...||Select only those files that have the specified attribute(s) set. See Attribute Switches for information on the attributes which can follow /A:. Do not use /A: with @file lists. See @file lists for details.|
You can specify /A:= to display a dialog to help you set individual attributes.
|/F||Update only those files that currently exist in the zip file, and which are older than the files on disk.|
|/G||Generate unique keys for each file encrypted. This setting controls the algorithm that generates AES cryptographic keys from the Password specified. For added security, a random salt value is generated, and a unique key will be generated for every unique combination of Password and salt. If /G is specified, a unique salt value and key will be generated for each file encrypted. If /G is not specified, a single salt value and key will be generated for all encrypted files in the archive.|
|/I||Save file descriptions (from DESCRIPT.ION or the NTFS description) as the compressed file's "File Comment".|
|/Ln||Set the compression level (0 - 6, where 0=no compression, and 6=maximum compression). The default is 4.|
You may use any combination of the sorting options below. If multiple options are used, the files will be sorted with the first sort option as the primary key, the next as the secondary key, and so on:
|n||Sort by filename and extension, unless e is explicitly included. This is the default.|
|-||Reverse the sort order for the next sort key|
|a||Sort names and extensions in standard ASCII order, instead of numerically when numeric substrings are included in the name or extension.|
|d||Sort by date and time (oldest first); also see /T:acw|
|e||Sort by extension|
|g||Group subdirectories first, then files|
|r||Reverse the sort order for all options|
|s||Sort by size|
|t||Same as d|
|/R||If the argument is a subdirectory, copy all of the files in that subdirectory and all of its subdirectories to the zip file.|
|/S||Use the specified password to encrypt the file(s). If you don't provide a password on the command line, ZIP will prompt you to enter one.|
|/TEST||Test the integrity of the ZIP file (header and contents). Any errors will be displayed on STDERR.|
|/V||View the list of files in the zip file (date, time, size, compression ratio, and filename). If the zip file is password protected, ZIP will append a * after the filename.|