Home Search

DriveWorks Pro 22
Zip Folder

Send Feedback

Zip Folder

This is now an inbuilt Task, please see ZipFolder for more information.

This task creates a Zip file based on a given full file path with Zip file name and a folder to Zip. The task allows the user to decide whether to overwrite the Zip file if it exists or not and will report to a specified reporting Constant that will report if successful. If the task is not it will be set to an error condition prefixed with #ZPERROR.

Zip Folder Properties

Property NameDescription
TitleChanges the Title (not the name) of the task.
ZIP File NameFull file name and path for the Zip file to create, including extension.
Folder NameFull file path of the folder that will be zipped.
Overwrite ZIPTRUE to overwrite an existing Zip, FALSE to keep existing file.
Result ConstantThe name of the Constant that the result will be posted to (with or without the DWConstant prefix).

Example

When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleExample ResultMeaning
ZIP File Name"C:\MyDocuments\Specifications\ZIPFolder\Documents" &DWSpecificationId&".zip"C:\Main\MyDocuments\Specifications\ZIPFolder\Documents9999.zipThis is the file name and full file path to the location of the created Zip Folder.
Folder Name"C:\MyDocuments\Projects\ProductInfo"C:\MyDocuments\Projects\ProductInfoThis is the location of the folder to Zip.
Overwrite ZIPTRUETRUETRUE will overwrite the Zip folder if it already exists in the Folder location.
Result Constant"DWConstantReport"DWConstantReportThis is the name of the Constant that the Macro Task will report to.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success (one of the following occurred)

  • Zip File Name Delete will not be extracted.
  • Zip folder has been created successfully.

Success with Warnings (one of the following occurred)

  • Existing ZIP File Name was found (Overwrite ZIP Property set to false).

Failed (one of the following occurred)

  • Zip File Name cannot be left empty.
  • Folder Name cannot be left empty.
  • Folder could not be found.
  • No folders or files could be found to zip.
  • General failure - Check the Specification report for more details.