wwApi::ZipFiles

Zips a set of files based on a filespec into a ZIP file.This method call talks directly to the DLL bypassing the ActiveX Control.

Dependencies:
dzip32.dll in the FoxPro or Windows path.

ZipFiles(lcZipFile, lcFileList, lnCompression, llRecurseDirectories)

Return Value

DynaZip error code on failure - 0 on success.

Parameters

lcZipFile
File to zip to.

lcFileList
File or file list to zip up. This list can be space separated and each file entry can contain wildcards (*,?).

Files should be fully pathed and if filenames contain spaces use " to encapsulate them.

Example:
["c:\temp files\*.bin" "c:\temp files\*.xml"]

lnCompression
Compression efficiency 1 light, 9 max. Default 9.

llRecurseDirectories
Recurses filespecs through lower level directories and adds full path information. Note path information is not relative sinze DynaZip does not support this functionality (as Winzip does).

Remarks

This is a library function, not a method of the wwAPI class.

Example

*** Create zip file with DBF and FPT files
ZipFiles("c:\temp\zipfiles.zip",CURDIR() + "*.dbf " + curdir() + "*.fpt")

*** Append additional files (last logical parm)
ZipFiles("c:\temp\zipfiles.zip",CURDIR() + "*.txt",9,.T.)

See also:

Class wwHTTP

© West Wind Technologies, 2004-2017 • Updated: 08/25/12
Comment or report problem with topic