User Guide

ZIPProvider Object 271
ZIPComment
Syntax ZIPComment: OleVariant
Description Sets and gets the comment for the archive file. Use this property to read a comment
of an existing archive file, or set the comment for a new archive file that you created.
ZIPFile
Syntax ZIPFile: OleVariant
Description Sets and gets the archive file path against which the operation is to be applied. To
create a new archive file set this property to the file path of the new file and then call
the Add method to populate the file with content. To add, delete, or extract files from
an existing archive file, set the property to the file path of the file and call
Add, Delete,
or
Extract methods on the file.
Example
Sample ZIPFile script
//***********************************************//
// The following example uses the ZIPFile property to extract a file
// (somefile.exe) from another file (d:\\downloads\\test.zip):
//************************************************//
function Main () {
var hsOKInfo = 64;
var app = Application;
var ZIPPro = app.ZIPProvider;
ZIPPro.ExtractionDir = ‘d:\\ExtractHere\\’; ZIPPro.ZipFile =
‘d:\\downloads\\test.zip’;
var ResultCode = ZIPPro.Extract(‘somefile.exe’);
app.MessageBox( "Return Code :" + ResultCode ,"ZIPProvider",
hsOKInfo);
}
Methods
Add
Syntax Add(Files: OleVariant; bRecurse, bIncludeDirs, bIncludeHiddenFiles, bIn-
cludeVolumeLabels: WordBool): Integer;
Description Boolean. Adds files to an archive. Use the Files parameter to narrow down the group
of files to add. You can specify a single file, a set of files delimited by line breaks, or an
entire directory using wildcards. Use the bRecurse parameter to add subfolders. Use
bIncludeDirs to specify whether directory information should be stored in the
archive. Use
bIncludeHiddenFiles and bIncludeVolumeLabels to restrict the
inclusion of hidden files or volume labels. Do not set the
bIncludeVolumeLabels
parameter to
True unless you specify the drive letter as the first element in the Files
parameter. The
Files parameter may contain multiple elements separated by line