Sample code for 30+ languages & platforms
Lianja

Open and Unzip an AES Encrypted Zip

See more Zip Examples

Open and unzip an AES encrypted Zip.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loZip = createobject("CkZip")

llSuccess = loZip.OpenZip("/myZips/aes.zip")
if (llSuccess <> .T.) then
    ? loZip.LastErrorText
    release loZip
    return
endif

// Set the password needed to unzip.
// This password must match the password used when the zip
// was created.
loZip.DecryptPassword = "myPassword"

// Unzip the .zip into /unzipDir.   
// Returns the number of files and directories unzipped.
lnUnzipCount = loZip.Unzip("/unzipDir/")
if (lnUnzipCount < 0) then
    ? loZip.LastErrorText
else
    ? "Success!"
endif



release loZip