Navigation:  Actions > Compression >

UNZIP Files Action

Previous pageReturn to chapter overviewNext page

The UNZIP Files action creates a step to extract files from a ZIP, GZ (gzip), or TAR file.  When built, the action finds all matching files and folders in the given archive file (recursively searching for matches if specified) and extracts to the folder specified.  When the step completes, the following temporary macros are created or updated:

UNZIP_PROCESS_COUNT = The number of files extracted from the archive file

 

Notes:

The ZIP Files action can be used to create or update archive files.
The Enhanced Unzip Files action can be used for advanced options.
This action is not available in the 64-bit edition of Visual Build.
By default, this action is not displayed (existing steps will still be displayed in the Step panes and will build normally).  To show all hidden actions, right-click in the Actions pane and choose Show Hidden.

 

Filename: The source file to extract files from (required).  Can be a ZIP, GZ (gzip), or TAR file.

 

Action: The action to perform. Extract always extracts any matching files; Update extracts only files that don't exist in the destination or that are older than the corresponding version in the archive file; Freshen extracts only existing files that are older than the version in the archive file.

 

Also extract files from TAR: When extracting a GZ file containing a TAR file, checking this option will first decompress the TAR file, and then extract the files from the TAR archive to the destination folder.  If unchecked, the file compressed in the GZ file will be extracted to the destination folder.

 

Files to process: Used to specify files or folders to specifically include (optional).  If the Include field is blank, all file and folder names in the archive file will be included.  To include specific files, add each mask on a separate line in the Include field.  Masks can be any valid file mask (for instance *.cpp, abc*, xyz*.*, myfile.rc?, etc.).  To include folders, prefix the line in the Include field with the folder name(s) (i.e., abc\xyz\*.txt).

 

Note: The Enhanced Unzip Files action can be used for enhanced filtering options.

 

Include subfolders: Determines if subdirectories in the archive file will be searched recursively for matching files.

 

Use directory names: If checked (the default), the folder information in the archive file will be used when extracting files.  If unchecked, all files will be extracted to the destination directory.

 

Dest folder: The destination path to extract files to (required). Important: Any existing, writeable files (and read-only files if the next option is checked) in the destination folder may be overwritten when extracting.

 

Overwrite read-only files: If checked, read-only files in the destination will be replaced.  If unchecked and a read-only file to be replaced exists, the step will fail.

 

Log files that are processed: If checked, any files extracted from the archive file will be logged.

 

Convert long filenames to 8.3 format: If checked and if any of the extracted files have long filenames in their path, those filenames are modified to create short filenames in the ZIP file by removing any spaces and taking the first characters (8 for folders/files and 3 for extensions) of each file component. For example, the filename my new folder\my long filename.extension would be changed to mynewfol\mylongfi.ext.

 

Do not convert filenames to OEM character set: If unchecked, the action will convert filenames in the ZIP file to their OEM character set.  This may be necessary to handle ZIP files created by old ZIP tools such as PKZIP 2.04g and files created by the ZIP Files action with the Generate PKZIP 2.04g compatible file option checked.  When unzipping gzip files, checking this option will cause long filenames to be ignored.

 

Password: Password to decrypt the files in the archive file (optional).  This action can unencrypt ZIP files encrypted using Zip 2.0 password protection or Single Password Advanced Encryption Standard (AES) strong encryption (reading of WinZip version 9.0 AES-1 and AES-2 encrypted items using 128-, 192- and 256-bit key lengths is also supported), as well as encrypted gzip files.