Tcl
Tcl
Open and Unzip an AES Encrypted Zip
See more Zip Examples
Open and unzip an AES encrypted Zip.Chilkat Tcl Downloads
load ./chilkat.dll
set success 0
# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set zip [new_CkZip]
set success [CkZip_OpenZip $zip "/myZips/aes.zip"]
if {$success != 1} then {
puts [CkZip_lastErrorText $zip]
delete_CkZip $zip
exit
}
# Set the password needed to unzip.
# This password must match the password used when the zip
# was created.
CkZip_put_DecryptPassword $zip "myPassword"
# Unzip the .zip into /unzipDir.
# Returns the number of files and directories unzipped.
set unzipCount [CkZip_Unzip $zip "/unzipDir/"]
if {$unzipCount < 0} then {
puts [CkZip_lastErrorText $zip]
} else {
puts "Success!"
}
delete_CkZip $zip