Xbase++
Xbase++
Open and Unzip an AES Encrypted Zip
See more Zip Examples
Open and unzip an AES encrypted Zip.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oZip
LOCAL nUnzipCount
nSuccess := 0
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
oZip := CreateObject("Chilkat.Zip")
nSuccess := oZip:OpenZip("/myZips/aes.zip")
IF (nSuccess != 1)
? oZip:LastErrorText
oZip:destroy()
RETURN
ENDIF
// Set the password needed to unzip.
// This password must match the password used when the zip
// was created.
oZip:DecryptPassword := "myPassword"
// Unzip the .zip into /unzipDir.
// Returns the number of files and directories unzipped.
nUnzipCount := oZip:Unzip("/unzipDir/")
IF (nUnzipCount < 0)
? oZip:LastErrorText
ELSE
? "Success!"
ENDIF
oZip:destroy()