PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Use condition
  • Compression level
  • Error codes
  • Adding a file that is already found in the archive
  • Subscript of files in the archive
  • Progress bar
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Adds a list of files (of any type) into an archive in ZIP, CAB, WDZ or 7z, TAR ou TGZ (TAR.GZ) format and compresses it. This function is faster than zipAddFile run for each file.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
WINDEVWEBDEV - Server codeWindows This function now supports the 7z format.
New in version 18
Android Widget This function is now available in Android Widget mode.
WINDEVWEBDEV - Server codeWindows This function now supports the 7z format.
Android Widget This function is now available in Android Widget mode.
WINDEVWEBDEV - Server codeWindows This function now supports the 7z format.
Versions 19 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 19
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWEBDEV - Server codeWindowsLinuxiPhone/iPadUniversal Windows 10 App This function now supports the TAR and TGZ (TAR.GZ) formats.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWEBDEV - Server codeWindowsLinuxiPhone/iPadUniversal Windows 10 App This function now supports the TAR and TGZ (TAR.GZ) formats.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWEBDEV - Server codeWindowsLinuxiPhone/iPadUniversal Windows 10 App This function now supports the TAR and TGZ (TAR.GZ) formats.
Example
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)
// Create an archive and add an element
// With progress bar
EventNum is int
NumZipErr is int

NumZipErr = zipCreate("MyArchive","C:\Doc\Archive\ArchiveFile.zip")
IF NumZipErr = 0 THEN
EventNum = Event("ProgressBar", WinInput(), CompressGauge)
NumZipErr = zipAddFileList("MyArchive", "C:\doc\Image\House.BMP" + CR +  ...
"C:\My Projects\WDStock\WDStock.wdp")
IF NumZipErr <> 0 THEN
Error(zipMsgError(NumZipErr))
END
EndEvent(EventNum)
zipClose("MyArchive")
ELSE
Error(zipMsgError(NumZipErr))
END

// Procedure that must be called to manage the progress bar
PROCEDURE ProgressBar
Gauge(_EVE.wParam, 100)
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)
// Create an archive and add an element
// With progress bar displayed in a Progress Bar control (new feature of version 21)
NumZipErr is int

NumZipErr = zipCreate("MyArchive","C:\Doc\Archive\ArchiveFile.zip")
IF NumZipErr = 0 THEN
NumZipErr = zipAddFileList("MyArchive", "C:\doc\Image\House.BMP" + CR +  ...
"C:\My Projects\WDStock\WDStock.wdp", zipDrive, PROGBAR_Progress)
IF NumZipErr <> 0 THEN
Error(zipMsgError(NumZipErr))
END
zipClose("MyArchive")
ELSE
Error(zipMsgError(NumZipErr))
END
Windows Mobile
// Create an archive and add an element
// With progress bar
EventNum is int
NumZipErr is int

NumZipErr = zipCreate("MyArchive","\Doc\Archive\ArchiveFile.zip")
IF NumZipErr = 0 THEN
EventNum = Event("ProgressBar", WinInput(), CompressGauge)
NumZipErr = zipAddFileList("MyArchive", "\doc\Image\House.BMP" CR + ...
"\My Projects\WDStock\WDStock.wdp")
IF NumZipErr <> 0 THEN
Error(zipMsgError(NumZipErr))
END
EndEvent(EventNum)
zipClose("MyArchive")
ELSE
Error(zipMsgError(NumZipErr))
END

// Procedure that must be called to manage the progress bar
PROCEDURE ProgressBar
Gauge(_EVE.wParam, 100)
Windows Mobile
// Create an archive and add an element
// With progress bar displayed in a Progress Bar control (new feature of version 21)
NumZipErr is int

NumZipErr = zipCreate("MyArchive","\Doc\Archive\ArchiveFile.zip")
IF NumZipErr = 0 THEN
NumZipErr = zipAddFileList("MyArchive", "\doc\Image\House.BMP" CR + ...
"\My Projects\WDStock\WDStock.wdp", zipDirectory, PROGBAR_Progress)
IF NumZipErr <> 0 THEN
Error(zipMsgError(NumZipErr))
END
zipClose("MyArchive")
ELSE
Error(zipMsgError(NumZipErr))
END
Syntax

Adding a list of files (files separated by CR) Hide the details

<Result> = zipAddFileList(<Archive> , <File Path> [, <Path Section to Store> [, <Management of Progress Bar>]])
<Result>: Integer
  • 0 if the addition was performed,
  • An error code (value greater than 0) otherwise. See Notes for more details.
<Archive>: Character string (with quotes) or zipArchive variable
Name of the archive into which the files will be added.
This name can correspond to:
<File Path>: Character string (with quotes)
Access path of the files that will be added into the archive, separated by CR characters. These paths can be full paths or paths relative to the current directory. The size of each path must not exceed 260 characters.
The size of each file must not exceed 4 GB. Otherwise, an error occurs.
You cannot use wildcard characters.
Versions 18 and later
WINDEVReports and QueriesWindows MobileUser code (UMC) This parameter has the following format:
<File Path> [ + TAB + <Path to Store> ]
If the path to store is specified, the addition will be equivalent to a file addition followed by a call to zipChangePath.
New in version 18
WINDEVReports and QueriesWindows MobileUser code (UMC) This parameter has the following format:
<File Path> [ + TAB + <Path to Store> ]
If the path to store is specified, the addition will be equivalent to a file addition followed by a call to zipChangePath.
WINDEVReports and QueriesWindows MobileUser code (UMC) This parameter has the following format:
<File Path> [ + TAB + <Path to Store> ]
If the path to store is specified, the addition will be equivalent to a file addition followed by a call to zipChangePath.
Windows Mobile Name and full path of the files that will be added into the archive, separated by CR characters. The size of each path must not exceed 260 characters.
Universal Windows 10 App The access path to the file is a full path or a path relative to the working directory of application (returned by fDataDir). Only the files found in the working directory can be added to the archive.
<Path Section to Store>: Optional constant
Versions 18 and later
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC) Indicates the section of file paths that must be stored in the archive. This parameter is taken into account for the files for which <Path to Store> was not specified.
zipNoneStores the file name and extension. For example: FileName.pdf
zipDirectoryStores the different directories found in the file path as well as the file name and extension. For example: \Directory\Files\FileName.pdf
zipDrive
(Default value)
Store the full and absolute path of file (name of disk, name of directories, file name and file extension). For example: C:\Directory\Files\FileName.pdf
For the ZIP format: This constant has no effect.
For the 7z format: This constant and zipDirectory will have the same effect
LinuxWindows Mobile This constant is not available as there is no root for the drive.
If you are using an archive in .CAB format, only the zipNone constant is taken into account. Indeed, the .CAB format cannot be used to store the paths inside the archive.
Universal Windows 10 App This parameter is not available: only the name of the file and its extension are stored.
New in version 18
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC) Indicates the section of file paths that must be stored in the archive. This parameter is taken into account for the files for which <Path to Store> was not specified.
zipNoneStores the file name and extension. For example: FileName.pdf
zipDirectoryStores the different directories found in the file path as well as the file name and extension. For example: \Directory\Files\FileName.pdf
zipDrive
(Default value)
Store the full and absolute path of file (name of disk, name of directories, file name and file extension). For example: C:\Directory\Files\FileName.pdf
For the ZIP format: This constant has no effect.
For the 7z format: This constant and zipDirectory will have the same effect
LinuxWindows Mobile This constant is not available as there is no root for the drive.
If you are using an archive in .CAB format, only the zipNone constant is taken into account. Indeed, the .CAB format cannot be used to store the paths inside the archive.
Universal Windows 10 App This parameter is not available: only the name of the file and its extension are stored.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC) Indicates the section of file paths that must be stored in the archive. This parameter is taken into account for the files for which <Path to Store> was not specified.
zipNoneStores the file name and extension. For example: FileName.pdf
zipDirectoryStores the different directories found in the file path as well as the file name and extension. For example: \Directory\Files\FileName.pdf
zipDrive
(Default value)
Store the full and absolute path of file (name of disk, name of directories, file name and file extension). For example: C:\Directory\Files\FileName.pdf
For the ZIP format: This constant has no effect.
For the 7z format: This constant and zipDirectory will have the same effect
LinuxWindows Mobile This constant is not available as there is no root for the drive.
If you are using an archive in .CAB format, only the zipNone constant is taken into account. Indeed, the .CAB format cannot be used to store the paths inside the archive.
Universal Windows 10 App This parameter is not available: only the name of the file and its extension are stored.
<Management of Progress Bar>: Optional character string (with or without quotes)
Versions 21 and later
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
AndroidAndroid Widget Java This parameter is not available.
New in version 21
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
AndroidAndroid Widget Java This parameter is not available.
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
AndroidAndroid Widget Java This parameter is not available.
Versions 18 and later
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)

Adding a list of files found in an array Hide the details

<Result> = zipAddFileList(<Archive> , <List of Files> [, <Management of Progress Bar>])
<Result>: Integer
  • 0 if the addition was performed,
  • An error code (value greater than 0) otherwise. See Notes for more details.
<Archive>: Character string (with quotes) or zipArchive variable
Name of the archive into which the files will be added.
This name can correspond to:
<List of Files>: Array of zipArchivedFile variables
Array of zipArchivedFile variables used to find out the characteristics of the files to add.
<Management of Progress Bar>: Optional character string (with or without quotes)
Versions 21 and later
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
New in version 21
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
New in version 18
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)

Adding a list of files found in an array Hide the details

<Result> = zipAddFileList(<Archive> , <List of Files> [, <Management of Progress Bar>])
<Result>: Integer
  • 0 if the addition was performed,
  • An error code (value greater than 0) otherwise. See Notes for more details.
<Archive>: Character string (with quotes) or zipArchive variable
Name of the archive into which the files will be added.
This name can correspond to:
<List of Files>: Array of zipArchivedFile variables
Array of zipArchivedFile variables used to find out the characteristics of the files to add.
<Management of Progress Bar>: Optional character string (with or without quotes)
Versions 21 and later
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
New in version 21
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)

Adding a list of files found in an array Hide the details

<Result> = zipAddFileList(<Archive> , <List of Files> [, <Management of Progress Bar>])
<Result>: Integer
  • 0 if the addition was performed,
  • An error code (value greater than 0) otherwise. See Notes for more details.
<Archive>: Character string (with quotes) or zipArchive variable
Name of the archive into which the files will be added.
This name can correspond to:
<List of Files>: Array of zipArchivedFile variables
Array of zipArchivedFile variables used to find out the characteristics of the files to add.
<Management of Progress Bar>: Optional character string (with or without quotes)
Versions 21 and later
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
New in version 21
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
Mode for managing the progress bar. This parameter can correspond to:
  • WINDEViPhone/iPadWindows MobileUniversal Windows 10 App the name of a Progress Bar control found in a window. The progress bar will display the progress regarding the addition and the compression of all the files used.
  • the name of a WLanguage procedure. This procedure has the following format:
    PROCEDURE <Procedure Name> (<Current File>, <Global Percentage of Progress>,
    <Percentage of File Progress>)

    where:
    • <Current File> corresponds to the name of the file currently processed.
    • <Global Percentage of Progress> corresponds to the percentage of progress regarding the addition of files into the archive.
    • <Percentage of File Progress> corresponds to the percentage of progress regarding the addition of the current file into the archive.
If you are using an archive:
  • in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
  • in 7z format, only <Global Percentage of Progress> is specified. <Percentage of File Progress> will have the same value.
WEBDEV - Server code The procedure must be a server procedure.
Remarks

Use condition

Adding files into an archive can be performed if:
  • The archive exists (an archive is created by zipCreate).
  • The archive is accessible in read/write.
  • The archive is a single-part archive.
  • The size of the file is less than 4 GB.
Caution:
  • The full path of each file is stored in the archives in ZIP or WDZ format.
  • Archives in CAB format: The files must be added immediately after the archive creation. This format cannot be used to add files into an existing archive.
  • Archives in RAR format: This function is not available.
  • Archives in 7z format: The archive is entirely compressed whenever zipAddFileList is called.
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.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava Only the archives in ZIP format are available.
Reminder:
  • LinuxiPhone/iPadUniversal Windows 10 App Only the archives in ZIP, TAR and TGZ (TAR.GZ) format are available.
  • AndroidAndroid Widget Windows MobileJava Only the archives in ZIP format are available.

Compression level

The files added into an archive in Zip format are compressed by default. The compression level of files added into an archive can be modified by zipCompressionLevel.

Error codes

The following error codes are returned:
  • 1: The path passed in parameter does not exist.
  • 2: Access denied: the user has no sufficient rights or the file is currently used. If the file to insert is a HFSQL data file, it must be closed by the following code:
    HClose(<File Name>)
    Multitask(<Time-out>) // Waits for the effective closing of the file
  • 3: The archive is corrupted.
  • 4: The path does not exist in the archive.
  • 5: Unable to write into the archive.
  • 7: The file is already found in the archive.
  • 8: An archive cannot be added to itself. For example, "MyArchive" cannot be added to "MyArchive".
The message corresponding to the error code is returned by zipMsgError.

Adding a file that is already found in the archive

An error occurs when adding a file that is already found in the archive. A file is identified by its stored path. Therefore, two files with the same name and with the same relative path cannot be added into an archive.

Subscript of files in the archive

When a file is added into an archive, a subscript is automatically assigned to the file. This subscript corresponds to the order in which the files are included in the archive. To select a file found in the archive, you can use:
  • The subscript of the element (note: the subscript of an element is returned by zipFindFile).
  • The stored path of element.
WINDEVReports and QueriesWindows MobileUser code (UMC)

Progress bar

In Windows, to view the progress of file addition and compression, an event must be branched on CompressGauge (1174). When this message is received:
  • the _EVE.wParam variable contains the percentage of compression for the current file
  • the _EVE.lParam variable contains the percentage of compression for all the files.
Caution: This event is not supported if the call to zipAddFileList is performed in a secondary thread.
Versions 21 and later
From version 21, <Management of Progress Bar> can also be used to manage the progress of file addition.
New in version 21
From version 21, <Management of Progress Bar> can also be used to manage the progress of file addition.
From version 21, <Management of Progress Bar> can also be used to manage the progress of file addition.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230zip.dll
Windows Mobile wp230zip.dll
Java wd230java.jar
Linux wd230zip.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment