This function is used to create a new empty zip file, use ZipAddFile or ZipAddBuffer to add files to the zip archive.
OutputVar := ZipCreateFile(FileName , Password)Function Example: hZip := ZipCreateFile("MyScript.zip", "MyPassword")
The name of the variable in which to store the zip handle that can be used in ZipAddFile, ZipAddBuffer and ZipCloseFile.
The name or path of the zip file to be created.
The password to use for the zip file.
Use ZipCreateFile to create a new zip file, then use ZipAddFile or ZipAddBuffer to add files to it and finally use ZipCloseFile to close the file.
You cannot add files to existing zip file or after ZipCloseFile has been called, instead UnZip all files and create a new zip file.
A_ZipCompressionLevel can be used to change compression level. Use 0 for lowest and 9 for highest compression.
ZipAddFile, ZipCloseFile, ZipOptions, UnZip, ZipCreateBuffer, ZipAddBuffer, ZipCloseBuffer, UnZipBuffer, ZipRawMemory, UnZipRawMemory, ZipInfo, ZipAddFolder
hZip:=ZipCreateFile("C:\Test.zip") ZipAddFile(hZip, "C:\MyScript.ahk") ZipCloseFile(hZip)