Contents - Index - Previous - Next


Zip method

 

Applies to

TVCLZip component

 

Declaration

function Zip: Integer;

 

Description

The Zip method compresses files into the zip file specified by the property ZipName.  Prior to calling this method you should add appropriate filenames and wildcards to the FilesList property.  If ZipName is an archive that already exists, the files in FilesList will be added to that archive.  Therefore if the archive already exists and you wish to create a new archive by the same name you will have to delete the original archive first. 

 

Return Value  

The return value is the actual number of files that were added to the zip file.  This may differ from the number of files that you added to the FilesList.  For instance if you added a file to the list that didn't actually exist.  Also, wildcards will normally expand the list to include more files.  If a file is skipped, for instance because there is no such file, then the OnSkippingFile Event will be called, if it has been assigned.