Zip Advanced
- Last Updated: December 12, 2023
- 3 minute read
- MOVEit Automation
- Version 2023.1
- Version 2023
- Documentation
Zip Advanced zips one or more files into a single archive with a configurable level of compression and an optional ZIP password.
Use Zip Advanced instead of the destination-level "Zip" checkbox if any of the following zip features are needed.
- Password - Although not very secure, Zip Advanced can apply a password to a zip archive.
- Multiple Files - The destination-level Zip checkbox will zip each file into its own individual zip archive. If you need to zip multiple files together instead, use Zip Advanced as a "run once after all downloads" process instead.
- Specific Zip Filename - To determine the zip filename, the destination-level Zip checkbox strips any given file extension and appends
.zipto the filename. If you need to preserve the entire original filename in the name of the zip archive or want to substitute it with something else, use the Zip Advanced process and apply the name you want in the appropriate destination configuration.
Input Parameters
- ZipAdvanced_ArchiveType - Specifies the type of archive to create. The values are "zip", "tar" or "7z". The default is "zip".
- ZipAdvanced_CompressionLevel - Specifies the level of compression. More compression takes more time. Values: 0 (no compression), 1, 3, 5 (default), 7, 9. All levels involve vendor-neutral Zip compression standards; you are unlikely to encounter incompatibilities with any level.
- ZipAdvanced_IgnoreOriginals - Specifies if MOVEit Automation should ignore the original, unzipped files after zipping them. If set to 'No', original files and zipped files will be present in the destination. Only applies if the script is run Once After All Downloads. The values are "Yes" or "No". The default is "Yes".
- ZipAdvanced_Password - An optional password to apply to the Zip file. Default is blank, which indicates no password is to set on the Zip archive. Note: CAUTION: Using a password to protect a Zip archive is not usually enough protection to thwart a determined hacker.
- ZipAdvanced_PreserveDirs - Specifies if MOVEit Automation should preserve the directory structure in the zip file. The values are "Yes" or "No". The default is "No".
Output Parameters
- ZipFileSize - Number of bytes in the zip file. This and other size parameters are populated only if the Zip file is successfully created.
- ZipFileSizeKB - Number of kilobytes (KB) in the zip file.
- ZipFileSizeMB - Number of megabytes (MB) in the zip file.
- ZipFileSizeGB - Number of gigabytes (GB) in the zip file.
Notes
Zip Advanced recursively includes subfolders in its archives if the "Include Subfolders" option has been set on any task sources.
When the script is run after all downloads, the zipped file in the destination is named centralzipfile.zip unless you clear the Use original filename(s) check box in the Destination general settings and specify a new name.
If the script is run after all downloads or outside of a file loop in an advanced task, Zip Advanced requires that the task-level "Cache Files" option be set to "Use Original Names". To set this option:
- In the
Admin Console
right-click a task name and select Edit Task Info... - In Web Admin, click TASKS, click a task name, expand the Advanced properties and click Edit.
This built-in script can be run per-file or once-after-all-files.
This built-in script cannot be run as the first step of a task.
- If the script is run per-file, the zipped files in the destination folder keep the original file extension but the content is zipped. For example, if the original file is test.txt, after the transfer the file will be test.txt with zipped contents.
Example #1
Al wants to download several
*.rpt
files from an FTP server, include a
readme.txt
from his local computer, and zip the entire package together in a highly compressed Zip archive.
To accomplish this with MOVEit Automation :
- Create a new task with a source, process, destination and schedule.
- Point the new source to the FTP server and use
*.rptas the file mask. - Enable Use original names in the task settings.
- Select "Zip Advanced" as the process.
- Set process parameters:
- ZipAdvanced_CompressionLevel = 9
- Run = "Once After All Downloads"
- Add a second source to the task and point it at the local "readme.txt" file.
- Two sources: one FTP server and one local,
- The Zip Advanced process (set to run after material is downloaded from all sources), and
- Any destination that you specify.