wwApi::UnzipFiles (deprecated)

This function has been deprecated: Please use the wwZipArchive class instead

Unzips a Zip file into a directory on disk. This method call talks directly to the DLL bypassing the ActiveX Control.

Dependencies:
Requires dunzip32.dll in FoxPro or Windows Path

UnzipFiles(lcZipFile, lcDestination, lcFileSpec)

Return Value

0 on success - DynaZip error code for failure.

DynaZip error code on failure - 0 on success.

  • 0—ZE_OK // success
  • 1—ZE_BUSY // can't reenter
  • 2—ZE_EOF // unexpected end of zip file
  • 3—ZE_FORM // zip file structure error
  • 4—ZE_MEM // out of memory
  • 5—ZE_LOGIC // internal logic error
  • 6—ZE_BIG // entry too large to split
  • 7—ZE_NOTE // invalid comment format
  • 8—ZE_TEST // zip test (-T) failed or out of memory
  • 9—ZE_ABORT // user cancelled
  • 10—ZE_TEMP // error using a temp file
  • 11—ZE_READ // read or seek error
  • 12—ZE_NONE // nothing to do
  • 13—ZE_NAME // missing or empty zip file
  • 14—ZE_WRITE // error writing to a file
  • 15—ZE_CREAT // couldn't open to write
  • 16—ZE_PARMS // bad control parameters
  • 17—ZE_INCOMPLETE // could not complete operation
  • 18—ZE_OPEN // could not open a specified file to read
  • 19—ZE_MEDIA // media error... disk not ready, HW r/w error, etc.
  • 20—ZE_MVPARMS // bad Multi-Volume control parameters
  • 21—ZE_MVUSAGE // Improper usage of a Multi-Volume Zip File

Parameters

lcZipFile
Zip File to unzip from

lcDestination
Path where files are to be unzipped.

lcFileSpec
File spec of files to be unzipped. Can include file paths.

Remarks

This is library function not a method of the wwAPI class

Example

*** Unzip all files to folder including folder structure
UnZipFiles("c:\temp\zippedFiles.zip","c:\temp\unzipped")

*** Unzip only .txt files and don't extract from subfolders
UnZipFiles("c:\temp\zippedFiles.zip","c:\temp\unzipped","*.txt",.F.)

See also:

West Wind Web Connection

© West Wind Technologies, 1996-2024 • Updated: 06/01/24
Comment or report problem with topic