Required Parameters
- type: The type of the archive. The allowed values are ZIP, TAR, JAR, and GZIP. The default is ZIP.
- archive: The path on disk, including the filename, of the archive to be extracted.
- extractto: The path on disk where the extracted files and folders should be placed.
Optional Parameters
- excludefile#: An array of files to exclude in the archive. For example, to exclude two files, set the paths to those files in
excludefile#1andexcludefile#2. See Introduction to ArcScript for more information about array attributes in Script. - path#: An array of paths within the archive to extract. Each path is relative to the root of the archive and must end in a forward slash (For example
<arc:set attr="zip.path" value="zipthis/" />). If this is not set, all paths in the archive are extracted.
Output Attributes
- zip:result: If the operation was successful, SUCCESS is returned.
Example
This example extracts only thezipthis folder from the zip archive located at /home/mydata.zip and places it in the /tmp/foo directory on disk. All files in the archive with a .txt extension are ignored and not extracted.