UNZIP |
Purpose: | Extract files from .ZIP archives |
Format: | UNZIP [/= /A:[[-][+]rhsdaecjot] /C /CRC /D /E /F /I /Nt /O /P /Q /S"password" /TEST /U /V] ziparchive path file ... |
ziparchive | The Zip file to work with |
path | The path where files will be extracted |
file | The file(s) to extract |
File Selection:
Supports command dialog, attribute switches, extended wildcards, ranges, multiple file names, and include lists.
File Completion Syntax:
The default filename completion syntax is: [1] dirs zip [2*] *
Usage:
You can specify a pathname for ziparchive. If you don't provide an extension, and the filename as entered doesn't exist, UNZIP adds ".zip". If you don't specify an operation, UNZIP will default to Extract. If you don't specify any arguments, UNZIP will display its command dialog.
UNZIP supports wildcards for the zip archive name and for the filenames to extract. UNZIP will prompt before overwriting existing files. Your options at the prompt are explained in detail under Page and File Prompts.
path specifies the path where files will be extracted. If path is not specified, files are extracted to the current directory.
UNZIP will automatically use the Zip64 extensions if the archive is in Zip64 format.
UNZIP sets two internal variables:
%_unzip_files | The number of files extracted |
%_unzip_errors | The number of errors |
Example:
Extract the files in myzip.zip, recreating the saved directory structure, overwriting any existing files:
unzip /d /o myzip.zip
Option:
/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 | Extract only those files that currently exist in the target folder, and which are older than the file in the zip archive. |
/I | Save the "File Comment" (if any) for each extracted file to the NTFS description or the DESCRIPT.ION file. |
/Nt | Don't update the CD / CDD extended directory search database (JPSTREE.IDX). |
/O | Overwrite existing files. UNZIP normally prompts before overwriting an existing file; /O will suppress the prompt. |
/S | Use the specified password to extract the file(s) from an encrypted archive. If you don't provide a password on the command line, UNZIP will prompt you to enter one. |
/TEST | Test the integrity of the ZIP file (header and contents). Any errors will be displayed on STDERR. |
/U | Extract files which either don't exist in the target folder, or which are older than the file in the zip archive. |