Creates a new zip file.
Syntax
ZipHandle = SRP_Zip("Create", FileName, Password = "")
Returns
A handle to the created zip file or 0 if there was an error.
Parameters
Name | Description |
---|---|
FileName | The name and path of the zip file to create. |
Password | Password to protect the file. Optional. |
Remarks
Call this service to create a new zip file. If the zip file already exists, then it will be replaced by this one. In both cases, the new zip file is empty. Use the returned handle in subsequent SRP Zip Utility calls.
The Password parameter can be used to password protect the zip file. If omitted or set to "", no password is used.
You must call the Close service when you finished with an opened zip file.
The common extension for zip files is .zip. However, you may use any extension you wish. This can be useful for distinguishing between zip files used for updates, imports, exports, etc.
Example
// Create a new zip file, and check for errors hZip = SRP_Zip("Create", "C:\MyFile.zip") If hZip EQ 0 then Call Msg(@Window, SRP_Zip("GetLastError")) end else // add file here SRP_Zip("Close", hZip) end