- Compression level
- Error codes
- Use condition
In french: zipCrée
Creates an archive. The created archive is automatically:
- opened in read/write. If the archive is in CAB format, the created archive is opened in write-only.
- a single-part archive.
The created archive can be:
- in standard WinZip or PKZip format (.ZIP extension).
- in "Cabinet files" format (.CAB extension).
- in WINDEV format (.WDZ extension).
- in 7z format (.7z extension).
- in TAR format (.TAR extension).
- in TGZ (TAR.GZ) format (.TGZ or.TAR.GZ extension).No archive in "RAR" format can be created.
MyArchive is zipArchive
ResCreate is int
ResAddFile is int
// Create the archive
ResCreate = zipCreate(MyArchive, "C:\Temp\Archive.zip")
IF ResCreate = 0 THEN
// Add a file into an archive
ResAddFile = zipAddFile(MyArchive, ...
// Display an error message if the file was not added
IF ResAddFile <> 0 THEN
<Result> = zipCreate(<Archive> , <Archive path> [, <Options>])
The files added into a zip archive are compressed by default. The compression level of files added into an archive can be modified by zipCompressionLevel
The following error codes are returned:
- 1: The path passed as parameter does not exist.
- 2: Access denied: the user has no sufficient rights.
The message corresponding to the error code is returned by zipMsgError
The maximum number of files that can be included:
- in a WDZ file: 232-1.
- in a ZIP file: 65535.
- in a CAB file: 65535.
- Only ZIP, TAR and TGZ (TAR.GZ) archives are available.
- Only ZIP archives are available.
The size of a file included in an archive (regardless of its format) must be less than 4 GB.
No archive in "RAR" format can be created.
Business / UI classification: Business Logic
This page is also available for…