Skip to content

Zip Command: zip

The zip command compresses a specified folder into a .zip file, reducing file size and consolidating multiple files into a single archive. This facilitates efficient storage, faster file transfers, and easier data sharing within an automation workflow.

Example: You want to compress the folder C:\Reports into a .zip file at C:\Archives\Reports.zip.

Steps to configure:

  1. Select Set a Variable Value from the Action dropdown.
  2. Enter a variable name in the Element Key field (e.g., ZipStatus). This variable will store the result.
  3. Click on Form to open the configuration window.
  4. Select Functions from the dropdown, then choose File handler Functions as the function.
  5. In the Cmd field, select zip.
  6. Provide the following parameters:
    • Source: Path to the folder to zip (e.g., C:\Reports).
    • ZipFilePath: Path and name for the .zip file (e.g., C:\Archives\Reports.zip).
  7. Click Save.
scrn-zip-command-tabular-view
Tabular View
scrn-zip-command-card-view
Card View

Outcome:

  • If the .zip file is created successfully, the variable in Element Key (e.g., ZipStatus) returns true.
  • If the process fails, it returns false.
  • This variable can be used in later steps of your automation process to reference the stored information using the syntax ${VariableName} (e.g., ${ZipStatus}).

Back To Top