ZipAddFile

Add a file to a zip archive created with ZipCreateFile or ZipCreateBuffer.

OutputVar := ZipAddFile(ZipHandle, FileName , ZipFileName)
Command  Example: ZipAddFile hZip, "MyScript.ahk", "scripts\MyScript.ahk"
Function Example: Success := ZipAddFile(hZip, "MyScript.ahk", "scripts\MyScript.ahk")

Parameters

OutputVar

The name of the variable in which to store 1 / true if file was added successfully or 0 / false if operation failed.

ZipHandle

Zip handle returned from ZipCreateFile or ZipCreateBuffer.

FileName

Name or path of the file that will be added to zip archive.

ZipFileName (optional)

Path and name of the file to use for zip archive. If omitted original file name will be used.

Related

ZipCreateFile, ZipCloseFile, ZipOptions, UnZip, ZipCreateBuffer, ZipAddBuffer, ZipCloseBuffer, UnZipBuffer, ZipRawMemory, UnZipRawMemory, ZipInfo, ZipAddFolder

Examples

hZip:=ZipCreateFile("C:\Test.zip")
ZipAddFile(hZip, "C:\MyScript.ahk")
ZipCloseFile(hZip)