Action | Description |
---|---|
Execute | You can either specify input files using the Source File or Directory property, or pass the files to the component through a DJMessage using the SourceMessage parameter. The output result is zipped to the target DJMessage object. |
Action | Parameter | Description |
---|---|---|
Execute | SourceMessage | Set this property to use DJMessage as a source. If a DJMessage is used as a source, then load the body of the DJMessage with the input files prior to the zip step. Note: Either the SourceMessage parameter or the Source File or Directory property must be defined, otherwise no source error occurs. If both are defined, the Source File or Directory property takes precedence over the SourceMessage parameter. |
Execute | TargetMessage | Set this property to write the zip file to a target DJMessage. If the Output Zip File property is used, the zip file will be written to the path/zip file name that is specified. If it is not used, then the zip file will be written to the body of the TargetMessage. Note: To create a valid Zip file (body of the TargetMessage), you must set the DJMessage Encoding property: trg.Encoding = ENC_BINARY |
Property Name | Description |
---|---|
Source File or Directory | The path and name of the file or directory that must be compressed. You can use a Macro to ensure the portability of the process. |
Include Source Directories and Sub-Directories | Select TRUE if you wish to include sub-directories, which may exist within the source directory, inside the zip file created by this component. Select FALSE if you do not wish to include sub-directories from the Source Directory in the resulting zip file. The default value is TRUE. |
Source File Matching Pattern | Allows you to specify a Java regular expressions or matching pattern using wildcards and literal characters to include only those files that match the specified pattern. Thus limiting or filtering the files that are compressed. This is case-insensitive. For example, a directory may consist of 100 files of different formats and extensions, but you may want to compress only files with “.csv” extension. In this case you can specify “.csv” in the Source File Matching Pattern text box. |
Target Zip File | (Optional) The path and name of the output zip file. You can use a Macro to ensure the portability of the process. |
Zip Password | For better security, a password can be set to open a zip file. This property allows you to specify a password that will be required to open the zip file. |
Zip Compression Method | The compression method: • DEFLATE (default) - The Deflate compression. • STORE - No compression. |
Zip Compression Level | The level of compression for the DEFLATE compression method: • FASTEST - Level 1 Deflate compression. • FAST - Level 3 Deflate compression. • NORMAL (default) - Level 5 Deflate compression. • MAXIMUM - Level 7 Deflate compression. • ULTRA - Level 9 Deflate compression. |
Zip Encryption Method | The encryption method used in the zip file: • NONE - No encryption is performed. • ZIP_STANDARD (default) - Encrypted with the weak zip standard algorithm. • AES - Encrypted with AES, the strongest choice. Note: When creating a zip file that uses the "AES" encryption method, make sure that your zip utility supports it. |
Zip Aes Key Strength | AES Key Strength is only applied to the AES Encryption Method with the following options: • KEY_STRENGTH_128 - 128-bit AES key length • KEY_STRENGTH_256 (default) - 256-bit AES key length Note: This property is only displayed for AES Encryption Method. |
Flatten Target | The flatten target property enables you to either maintain the original directory structure when compressing the files to a zip file, or discard that structure and compress all files to a single folder (the current directory). Valid values: • TRUE - Do not retain the directory structure when compressing files and flatten everything out. • FALSE (default) - Retain the directory structure when compressing files. |
Target Duplicates | The following options are available for duplicate zip entries (the same file name and target folder name): • Error (default) - Throw exception • Ignore - Keep first zip entry • Replace - Keep last zip entry • Rename - Keep all files by adding a number before the file extension. Note: This property is only applied when Flatten Target property is set to TRUE. |
Code | Description | Reason |
---|---|---|
6 | Write error | Error occurred while writing ZipEntry to zip file. |
6 | Write error | Error occurs when writing message to zip file. |
12 | No source error | No message file input to zip. Set the Source File Or Directory property for creating the zip file. |
46 | License error | The Zip Iterator is not licensed or has an expired license. |