Creates a new zip file.

Syntax

ZipHandle = SRP_Zip_Create(File)

Returns

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

Parameters

File The name and path of the zip file to create.

Remarks

Call this routine 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.

You must call SRP_Zip_Close 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 files here
end
  • No labels