SevenZip Task

Properties   Config Settings  

The SevenZip task implements a 7zip-compatible Zip compressor and decompressor.

Remarks

The SevenZip task is used when compressing or decompressing data in the form of files.

SevenZip Assembler Task

The Assembler takes a group of files as input which contains raw data, and generates a SevenZip archive file as output.

Compression strength is regulated by the CompressionLevel property. The compression method is specified by the CompressionMethod property. Specify the Password property to protect the archive.

SevenZip Disassembler Task

The Disassembler takes a compressed file as input, and generates a group of decompressed files as output.

The Password property must be set in order to extract files which have been protected. You may also use the ExcludedFiles property to regulate which files are to be extracted from the archive.

Assembler Property List


The following is the full list of the properties of the assembler task with short descriptions. Click on the links for further details.

AppendAppend files to the specified archive.
ArchiveFileThe name of the zip archive.
CompressionLevelThe compression level to use.
CompressionMethodUsed to set the method of compression.
ExcludedFilesA list of files to exclude.
IncludedFilesSpecifies which files the component should include when compressing.
LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during component execution.
OtherDefines a set of configuration settings to be used by the task.
PasswordA password for the zip archive.
RecurseSubdirectoriesWhether or not to recurse into subdirectories.
RuntimeLicenseSpecifies the component runtime license key.

Disassembler Property List


The following is the full list of the properties of the disassembler task with short descriptions. Click on the links for further details.

ArchiveFileThe name of the zip archive.
ExcludedFilesA list of files to exclude.
ExtractToPathA base path to decompress to.
FileListString denoting the name of the variable which contains the last file listing entries.
FileMaskSpecifies which files the component should include when extracting.
LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during component execution.
OperationThe operation which will be executed by the SevenZip task.
OtherDefines a set of configuration settings to be used by the task.
OverwriteFilesWhether or not to overwrite files.
PasswordA password for the zip archive.
RecurseSubdirectoriesWhether or not to recurse into subdirectories.
RuntimeLicenseSpecifies the component runtime license key.

Config Settings


The following is a list of config settings for the task with short descriptions. Click on the links for further details.

PlainPasswordAllows you to specify a password stored in plaintext.

Append Property (SevenZip Task)

Append files to the specified archive.

Data Type

Boolean

Default Value

false


Remarks

During compression, the files specified by the IncludedFiles property will be appended to the ArchiveFile.

This property is not available in the Disassembler/Decoder.

ArchiveFile Property (SevenZip Task)

The name of the zip archive.

Data Type

String

Default Value

""


Remarks

This property specifies the name of the archive to be read or written. This property is required when compressing or extracting files.

If scanning or extracting, the file specified by ArchiveFile will be opened for read. If the file does not exist, a trappable error will be generated.

During compression, the file named by ArchiveFile will be written; if a file of this name already exists, the file will be overwritten.

The filename may be specified with or without a path. Paths may be relative or absolute, and should be specified in the format native to the host operating system. The filename should be specified with the appropriate extension (such as "zip"); an extension will not automatically be appended by the task.

If the file cannot be read, or written, as appropriate, a trappable error will be generated.

CompressionLevel Property (SevenZip Task)

The compression level to use.

Data Type

Integer

Default Value

3


Remarks

This property is only applicable when using the LZMA CompressionMethod. This property specifies the level of compression to be used. Valid values are: 1, 2, 3, 4 and 5. Higher values will cause the component to compress better; lower values will cause the component to compress faster. The default value is 3.

This property is not available in the Disassembler/Decoder.

CompressionMethod Property (SevenZip Task)

Used to set the method of compression.

Data Type

Enumeration

Possible Values

Lzma (0)
Bzip 2 (1)
Delta (2)
Copy (3)
Deflate (4)
Lzma 2 (5)


Default Value

0


Remarks

This is used to specify different compression methods. By default the task uses the LZMA compression method (a value of 0). Supported values are:

ValueMethod
cmszLzma (0 - default) LZMA
cmszBzip2 (1) BZip2
cmszDelta (2) Delta
cmszCopy (3) Copy (no compression)
cmszDefalte (4) Deflate
cmszDefalte (5) LZMA2

This property is not available in the Disassembler/Decoder.

ExcludedFiles Property (SevenZip Task)

A list of files to exclude.

Data Type

String

Default Value

""


Remarks

This property specifies files that should be excluded when compressing or extracting a file. When either compression or extraction occurs, each file will be compared to ExcludedFiles, and each file that matches will be excluded.

This property may be set to one or more file names. These file names may be specified with or without a path, and with or without wildcards. If a path is specified, files in the indicated extraction directory will be excluded. If no path is specified but wildcards are, matching files in all directories will be excluded. If a single file name without a path is specified, it must correspond exactly to the appropriate value of a valid file name.

Directories should end with a slash ("/" or "\", as appropriate.) If a directory is specified, all files and subdirectories in the specified directory will be excluded during extraction.

A pipe character ("|") should be used to separate multiple file or directory names.

If the property is set to the empty string, no files will be excluded.

ExtractToPath Property (SevenZip Task)

A base path to decompress to.

Data Type

String

Default Value

""


Remarks

Setting the ExtractToPath property affects the opExtract Operation. Setting this property to a nonempty string will cause all decompressed files to be written to the specified path. If pathnames are given in the values of decompressed names, they will be regarded as relative to ExtractToPath.

If the specified directory does not exist, it will be created when extraction is done.

ExtractToPath should always be specified in the format native to the host operating system, and with a trailing slash or backslash. If the path is specified otherwise, it will be immediately converted and stored in the converted format. For example, "/temp" would be immediately converted to "\temp\" on a Windows system.

This property is not available in the Assembler/Encoder.

FileList Property (SevenZip Task)

String denoting the name of the variable which contains the last file listing entries.

Data Type

String

Default Value

"<none>"


Remarks

This property denotes a variable name which contains the collection of file listings returned from the task when the Operation property has been set to opScan. The collection is made up of entries for each listing in the current archive, specified by the ArchiveFile property.

The variable is in the form of a datatable. The table's rows represent a file listing, and the columns represent a different property of the listing. The columns of the datatable are listed below:

(0) CompressedDateThe last modified date of the file, as stored within the archive (it does not generally correspond to when the file was compressed).
(1) CompressedNameThe entry name, as stored within the archive.
(2) CompressedSizeThe size of the compressed data, as compressed within the archive. Headers, footers, etc., are not included in the size.
(3) DecompressedNameThe name of the file in the archive, as stored on the file system, outside the archive.
(4) DecompressedSizeThe size of the file, as decompressed outside the archive.
NOTE: If this property is set to a valid ADO object when the Operation property is set to opExtract, the task will populate this table with a file listing of all the files matching the IncludedFiles in the archive.

This property is read-only.

This property is not available in the Assembler/Encoder.

FileMask Property (SevenZip Task)

Specifies which files the component should include when extracting.

Data Type

String

Default Value

"*"


Remarks

FileMask may be used when extracting to specify which files will be extracted from the ArchiveFile property.

The value should be a pipe ("|") -delimited sequence of one or more filenames. The filenames should be specified with paths if necessary, so that the files may be found on the local file system.

Filenames may include the wildcards '?', '*', and '< .. >'. '?' will match any single character, and '*' will match an arbitrary sequence of characters. '< .. >' may be used to match any of the characters inside, or a range, such as '<a-z>'.

During extraction, FileMask may be set to one or more filenames or directory names. Files may be specified with or without a path, and with or without wildcards.

Subdirectories will be recursed into if RecurseSubdirectories is set to true.

The ExcludedFiles may be used to limit the files to be extracted.

This property is not available in the Assembler/Encoder.

IncludedFiles Property (SevenZip Task)

Specifies which files the component should include when compressing.

Data Type

String

Default Value

""


Remarks

IncludedFiles may be used when compressing to specify the files to be compressed.

The value should be a pipe ("|") -delimited sequence of one or more filenames. The filenames should be specified with paths if necessary, so that the files may be found on the local file system.

Filenames may include the wildcards '?', '*', and '< .. >'. '?' will match any single character, and '*' will match an arbitrary sequence of characters. '< .. >' may be used to match any of the characters inside, or a range, such as '<a-z>'.

If wildcards are specified, the file system will be scanned and all files matching the specified mask will be added to the list of files to compress.

Subdirectories will be recursed into if RecurseSubdirectories is set to true.

The ExcludedFiles may be used to limit the files to be compressed.

This property may also be set to a macro with the variable name that contains the contents of the data to be compressed. The macro must start and end with the '%' character. The compressed filename will be the variable name. The following example shows how to specify a variable name:

Example

Control.IncludedFiles = "%User::MyVariable%"

This property is not available in the Disassembler/Decoder.

LogFile Property (SevenZip Task)

The file to write logging information to at runtime.

Data Type

String

Default Value

""


Remarks

To write logging information to a file instead of using the task's logging API, set this property to a valid file on disk.

When set, any logging information is appended to the specified file and not written to the task's logging API.

LogMode Property (SevenZip Task)

What information gets logged during component execution.

Data Type

Enumeration

Possible Values

Verbose (0)
Info (1)
Warning (2)
Error (3)
Fatal (4)


Default Value

3


Remarks

This property controls what information the task logs. The possible values have the following affect on the task's behavior:

VerboseThe task will report all information regarding the transport.
InfoThe task will report all major operations, as well as all warnings and errors.
WarningThe task will report any conditions that could result in unpredictable behavior as well as errors.
ErrorThe task will report all errors that prevent normal operations from completing.
FatalThe task will report only serious errors that cause the task to completely stop functioning.

Operation Property (SevenZip Task)

The operation which will be executed by the SevenZip task.

Data Type

Enumeration

Possible Values

Extract (0)
Scan (1)


Default Value

0


Remarks

There are two different operations that the SevenZip Disassemble task may perform. It may extract files, or perform a scan on the entire archive specified by ArchiveFile.

The default for this property is to extract files.

This property is not available in the Assembler/Encoder.

Other Property (SevenZip Task)

Defines a set of configuration settings to be used by the task.

Data Type

String

Default Value

""


Remarks

The task accepts one or more configuration settings. These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the task, access to these internal properties is provided through the Other property.

The Other property may be set to one or more configuration settings (name/value pairs). Set one setting per line. For example: configname1=value1 configname2=value2

OverwriteFiles Property (SevenZip Task)

Whether or not to overwrite files.

Data Type

Boolean

Default Value

true


Remarks

If this property is set to true, existing files will be overwritten when decompressing. When extracting, each file specified by the FileMask will be checked for existence. If a file exists, the files will be overwritten if OverwriteFiles is set to true.

This property is not available in the Assembler/Encoder.

Password Property (SevenZip Task)

A password for the zip archive.

Data Type

Password

Default Value

""


Remarks

This property specifies the case-sensitive password used to encrypt or decrypt the archive. If set to an empty string, no password is used.

Example (Compressing an Archive)

ZipControl.ArchiveFile = "c:\test.zip" ZipControl.RecurseSubdirectories = true ZipControl.IncludeFiles("c:\foo\*") ZipControl.Password = "nsoftware" ZipControl.Compress()

RecurseSubdirectories Property (SevenZip Task)

Whether or not to recurse into subdirectories.

Data Type

Boolean

Default Value

true


Remarks

This property affects the behavior of the IncludedFiles and FileMask properties and the meaning of ExcludedFiles property. If this property is set to true, the IncludedFiles and FileMask properties will recurse into all subdirectories whenever it performs a search on the file system.

RuntimeLicense Property (SevenZip Task)

Specifies the component runtime license key.

Data Type

String

Default Value

""


Remarks

You can use the RuntimeLicense property to set the runtime key for the task license.

Config Settings (SevenZip Task)

The task accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the task, access to these internal properties is provided through the Other property.

SevenZip Config Settings

PlainPassword:   Allows you to specify a password stored in plaintext.

By default the Password value will be encrypted with a machine specific key. This secures the password, however the pipeline must be compiled and deployed on the same machine so the same key can be used to decrypt the value. In certain cases you may wish to store the password value in plaintext so decryption is not required at runtime. This setting would be used to specify this like so:

PlainPassword=yourpassword In this case you would not specify any value for Password.