UnZip
Extract one or all items from a zip archive.
OutputVar := UnZip(ZipFileName, DestinationFolder , FileToExtract, DestinationFileName, Password) OutputVar := UnZip(Address, Size, DestinationFolder [, FileToExtract, DestinationFileName, Password])
Command Example: UnZip "MyZip.zip", "C:\Temp", "scripts\MyScript.ahk" UnZip &zip;, sz, "C:\Temp", "scripts\MyScript.ahk" Function Example: Success := UnZip("MyZip.zip", "C:\Temp", "scripts\MyScript.ahk") Success := UnZip(&zip;, sz, "C:\Temp", "scripts\MyScript.ahk")
Parameters
- OutputVar
The name of the variable in which to store 1 / true if file(s) was extracted successfully or 0 / false if operation failed.
- ZipFileName or Address
The path and name of zip archive or an address to memory containing a zip archive.
- Size
When previous parameter is an address, the size of zip archive in memory otherwise this parameter is skipped, see examples.
- DestinationFolder
Path where to extract the file(s) to.
- FileToExtract (optional)
Relative path and name or zero based index of the file within zip archive that will be extracted. If omitted all files will be extracted.
- DestinationFileName (optional)
FileName for the file that will be extracted. If omitted original file name from zip archive will be used.
- Password (optional)
Password for zip archive.
Related
ZipCreateFile, ZipAddFile, ZipCloseFile, ZipOptions, ZipCreateBuffer, ZipAddBuffer, ZipCloseBuffer, UnZipBuffer, ZipRawMemory, UnZipRawMemory, ZipInfo, ZipAddFolder
Examples
UnZip("C:\Test.zip", "C:\Temp\Test")