Skip to main content

Compress files/folders

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

This command compresses specified files and/or folders into a zip file. It allows you to create compressed archives with various options including password protection and different compression levels.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

File(s) to compress

The full path of the file(s) or folder(s) to include in the zip file

File or folder path

Yes

Multiple files can be selected

Zip file name

The name of the compressed file. If the file already exists, a duplicate will be created

Text

Yes

Automatically adds .zip extension

Destination folder

The location where the compressed file will be saved

Same as source directory, Select target folder

Yes

Folder path

Select a folder, or enter the folder path where the compressed file will be saved

Folder path

Yes (if "Select target folder" is chosen)

If the folder doesn't exist, it will be created automatically

Advanced settings

Parameter

Description

Possible Values

Required

Options / Notes

Set password

The password for protecting the zip file

Text

No

If left blank, a zip file without password will be created

Compression Level

The level of compression to use

Balance, Best speed, Best compression

Yes

Higher compression creates smaller files but takes longer to process

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption

Variables produced

This action produces the following variable:

  • Store compressed file path into: Contains the full path to the newly created zip file


Using Variables in Conditions

You can use variables in fields marked with the {x} icon. This allows you to dynamically set file paths, names, or passwords using variables from previous actions. For example, you could use a variable to specify a file path based on user input or system information.


Notes

  • Make sure you have sufficient permissions to access the source files and write to the destination folder

  • Large files or folders may take longer to compress, especially with higher compression levels

  • If you use password protection, make sure to remember the password as it cannot be recovered if lost

  • Ensure source files are not locked by other processes during compression

Did this answer your question?