Compress ZIP

Operation Name

Compress ZIP

Function overview

Compress file or directory into a ZIP file.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required/Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Required settings
Item name Required/Optional Use of Variables Description Remarks
Path to compress Required Available Enter the path to compress a file or directory.

Click [Browse] button to activate the file Selectr and Select the file.
Output to Required Available Enter the path to the destination to output file or directory.

Click [Browse] button to activate the file Selectr and Select the file.

If you specify a directory path, the compressed file name will be "${directory name}.zip".
Option
Item name Required/Optional Use of Variables Description Remarks
Encoding Optional Available Select or specify an encoding of a file or a directory to be zipped.

Use only the canonical name supported by Java SE Runtime Environment 8 when specifying the encoding directly in the field.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.
  • For information regarding the default values used, refer to "Default encoding" .
  • If you omit the value, the default value is set.
Error when file already exists at output destination Optional Not available Select whether to raise error if compressed file/directory already exists in the compressing destination.
  • [Checked]: (default)
    Raise error.
  • [Not Checked]:
    Overwrite.
 
Encryption
Item name Required/Optional Use of Variables Description Remarks
Encrypt zip file Optional Not available Select if encrypt the zip file or not.
  • [Not Checked]: (default)
    Not encrypt.
  • [Checked]:
    Encrypt.
 
Password Optional Available Specify a password to encrypt.
  • Enabled if [Encrypt zip file] is checked.
Confirm password Optional Available Specify a password to encrypt for confirmation.
  • Enabled if [Encrypt zip file] is checked.
  • An error occurs at execution time, if this value does not match the [Password].
Encryption type Optional Not available Select the encryption type.
  • [Standard]: (default)
    Encrypt a file/directory with the zip standard encryption.
  • [AES-256]:
    Encrypt a file/directory with AES-256.
  • Enabled if [Encrypt zip file] is checked.
Comment
Item name Required/Optional Use of Variables Description Remarks
Comment Required Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

None.

Output Schema

None.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available Component variables

Variable name Description Remarks
success Wither success or failure of the process is stored.
  • The value defaults to null.
  • If successful the operation is true, returns false if it fails.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

Main exceptions

Exception name Cause Solution
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].
FileExistsException The specified file exists on the destination. Check the [Path to compress] or the [Output to].
java.io.FileNotFoundException The specified file or directory not found. Check the [Path to compress] or the [Output to].
PathIsNotAbsoluteException The specified path is a relative path. The path only accepts an absolute path. Specify an absolute path for the [Path to compress] or the [Output to].
ZipOperationException
Password is not specified.
The [Password] to encrypt is not specified. Specify the [Password].
ZipOperationException
Passwords do not match.
The [Password] and the [Confirm password] do not match. Specify the same password to the [Password] and the [Confirm password].