Opens an existing zip file.

 Syntax

ZipHandle = SRP_Zip("Open", FileName, Password = "")

Returns

A handle to the opened zip file or 0 if there was an error.

Parameters

NameDescription
FileNameThe name and path of the zip file to open.
PasswordThis password needed to open the file.

Remarks

Call this service to open an existing zip file. If the zip file does not exist, then a new one is created for you. Use the returned handle in subsequent SRP Zip Utility calls.

The Password parameter is required if the zip file is password protected. If omitted or set to "", no password is used.

You must call Close when you finished with an opened zip file.

Example

// Open an existing zip file, and check for errors
hZip = SRP_Zip("Open", "C:\MyFile.zip")
If hZip EQ 0 then
   Call Msg(@Window, SRP_Zip("GetLastError"))
end else
   // add, extract, or remove files here
   SRP_Zip("Close", hZip)
end
  • No labels