Compression Action

(Requires EAM) Occasionally, users might upload or download files that need to be compressed (for example, zipped) or decompressed (for example, unzipped) before transferring. The Compress/Decompress Action can be used to compress and decompress files. You can compress/decompress the following formats: ZIP, 7Zip, GZip, BZip2, Tar, Tar and GZIP, and ZCompress.

  • To ensure maximum compatibility with third-party archival tools, Unicode passwords should be avoided.

  • The Source and Destination file path specifications are limited to physical paths only – virtual paths will not work for these fields.

  • For GZip format, add a trailing slash to the Destination path to make it explicitly clear that the destination is to be interpreted as a folder. If Overwrite is set to never, no error occurs, and the Action completes by removing the original GZip file.

  • Decompress Action Destination Paths and Trailing slashes (\):

  • If a user wants to decompress an entire archive and place it into a folder, using a destination path with a trailing slash (\) will always accomplish this. This is the typical use case and is shown in the example below the destination field. The only exception is if ZCompress is used, in which case the behavior is the same as for Zip, Tar, and 7zip as described below. If the trailing \ is missing, the behavior depends on the decompression format used:

    • For Zip, Tar, and 7zip archive formats it doesn’t matter if the trailing \ is there, because the path will always be treated as the folder in which to decompress the entire archive. The exception to this is if the “< >” syntax is used where individual archive files and their destinations paths can be specified.

    • For Gzip, Bzip2, and “Tar and Gzip” (and ZCompress with or without trailing \) archive formats, only a single file whose name is the last part of the destination path will be extracted, decompressed, and saved into the parent folder specified in the destination path. So, if the destination path is given as “c:\myFolder\myFile”, then a file named “myFile” will be extracted from the specified source archive, decompressed, and placed in “c:\myFolder” (with the same name).

To compress or decompress files using Event Rules

  1. Add the Event to the Event Rule (for example, File Downloaded).

  2. Add any (optional) Conditions.

  3. Add the Compression Action.

  4. Click any links in the Action to open the Compress/ Decompress dialog box.

  5. In the Action list, click the desired Action: Compress or Decompress.

  6. In the Format box, specify the format in/from which to compress or decompress the file: ZIP, 7Zip, GZip, BZip2, Tar, Tar and GZIP, and ZCompress.

  7. If the Compress Action is specified, in the Method list, specify the Method: Deflate or PPMd.

  8. If the Compress Action is specified, in the Level list, specify a level of compression to apply, from 0 - fastest to 6 - densest.

  9. If the Decompress Action is specified, the Method and Level lists are unavailable.

  10. In the Files area, specify the Source and Destination paths. (As noted above, only physical paths should be specified; virtual path will not work.)

    • Select the variable drop-down list (percent sign %) to specify a context variable. You can specify more than one and use wildcards, as shown in the examples.

    • Select the folder icon to browse to a folder. Add a trailing slash to the Destination path to make it explicitly clear that the destination is to be interpreted as a folder.

  11. In the Options area, the Overwrite options (Never, Always, If Newer). If Newer is available when the Decompress Action is specified.

  12. Select the check boxes to specify whether to Include subfolders (for Compress Action), Overwrite read-only files (for Decompress Action), and/or Remove source files after decompressing or compressing the file.

  13. If encryption is desired, select the Encrypt check box and then specify and confirm the password. Select the Show check box to see if you've entered the password correctly.