Zip File

Description

The Zip file action creates a standard ZIP archive using the options you specify in the dialog.

Options

General tab

Option Description

Action name

The name of the workflow action.

Source files

Get arguments from previous

This checkbox takes the filename specification from the result rows of a previous workflow action. This is what will be taken from the rows.

  • The first field has to contain the filename or folder.

  • The second field should contain the inclusion wildcard

  • The third field should contain the exclusion wildcard.

  • The fourth field should contain the target zip file (this can be different for each file).

Source directory/file

The source directory of the files to be zipped

Include wildcard (RegExp)

The wildcard (regular expression) of the files to include in the zip archive

Exclude wildcard (RegExp)

The wildcard (regular expression) of the files to exclude from the zip archive

Include sub-folders

Enable this option to search files in sub-folders

Zip file

Zip file name

The full name of the destination archive

Create parent folder

Create the parent folder if it doesn’t exist

Include date in filename

Add the date to the file name

Include time in filename

Add the time to the file name

Specify date time format

Allows you to specify the date/time format mask,

Date time format

The date time format mask, like yyyy/MM/dd HHmmss

Show filename

Shows an example filename based on the options you specified

Advanced tab

Option Description

Advanced

Compression

The compression level to be used. The options are * Default * Best Compression * Best speed

If zip file exists

The action to take when there already is a file at the target destination. The options

  • Create new with unique name

  • Append to existing

  • Do nothing (default)

After zipping

The action to take after zipping. The options are

  • Do nothing (default)

  • Delete files

  • Move files

Move files to

The target directory to move the source files to after zipping

Create folder

Create the folder to move to

Stored source path depth

This is the part of the source file path which is taken over in the ZIP file archive structure.

Result file name

Add Zip file to result

Enable this option to add the target zip file(s) to the result

Result

What this action passes on to the next action. See Action results for how results travel through a workflow.

Result Value

True

The zip file was created or updated. It is also true when the zip exists and If zip file exists is Do Nothing, which leaves it unchanged, and when no file matches the wildcard with Include sub-folders off, which creates an empty zip. With Include sub-folders on, no match makes the action false and creates no zip.

False

The source doesn’t exist, the zip exists and If zip file exists is Fail, the zip can’t be written, or a source file can’t be deleted with After zipping; the zip is already created then. With After zipping set to Move files, it is also false when the folder to move to doesn’t exist and Create folder is off. The number of errors is 1.

Result files

With Add Zip file to result, the zip file is added, also an existing zip left unchanged by Do Nothing. A zip whose creation fails is not added, but a zip that was created stays in the result files even when the action ends up false.

Result rows

Passed on unchanged. With Get arguments from previous, every result row gives the source (first field), the include wildcard (second), the exclude wildcard (third) and the zip file name (fourth). A row with an empty source or zip file name is skipped. The first row that fails ends the action, which is then false; the zips of the earlier rows stay, and are in the result files. When every row is zipped, the result of the previous action is passed on, true or false.

With an empty Source directory/file, or with Get arguments from previous and no result rows, nothing is zipped and the result of the previous action is passed on. A source file that can’t be moved with After zipping set to Move files is only logged: the action is still true, and the zip is in the result files.