ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Archive functions
  • Use conditions
  • Error codes
  • Closing the archive
  • Number of parts
  • Actions that can be performed on a multi-part archive
  • The multi-part archive is found on diskettes
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Merges the different sub-archives found in a multi-part archive to create a single-part archive.
Example
WINDEVUser code (UMC)
MonArchive is zipArchive
// Ouverture d'une archive multi-parties
ResOuvreArchive = MonArchive.Open("C:\MesArchives\Archive.zip") 
IF ResOuvreArchive = 0 THEN
	...
	// Regroupement des sous-archives d'une archive multi-parties
	ResRegroupe = MonArchive.Regroupe(...
			 "C:\MesArchives\ArchiveMono.WDZ")
	...
END
Syntax
<Result> = <Archive>.Merge(<Archive destination> [, <Progress bar management>])
<Result>: Integer
  • 0 if the sub-archives have been merged,
  • an error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
<Archive>: zipArchive variable
Name of a variable of type zipArchive corresponding to the archive to use.
<Archive destination>: Character string
Physical path of new single-part archive (up to 260 characters). This path must contain the name of single-part archive to create. If the extension (.WDZ or .ZIP) is not specified, the extension corresponds to the initial extension. It is possible to specify the same path and name as the cut archive: the cut archive will be overwritten by the grouped archive.
<Progress bar management>: Optional character string
WINDEV Name of the Progress Bar control in a window. The progress bar will display the progress of the grouping.
Remarks

Use conditions

Note: Grouping can only be carried out if:
  • The archive exists (archives are created using <zipArchive variable>.Create).
  • The archive is a multi-part archive.
  • The archive is not in "CAB" format, "RAR" format or in "gzip", "TAR" or TARGZ" format.
Reminder:
  • Linux Only archives in ZIP, gzip, TAR and TGZ (TAR.GZ) formats are available.

Error codes

The following error codes are returned:
  • 1: Path passed as parameter does not exist.
  • 2: Access denied: user does not have sufficient rights.
  • 3: The archive is corrupt.
  • 6: Sub-archives are not in order.
The message corresponding to the error code is returned by zipMsgError.

Closing the archive

Once <zipArchive variable>.Merge has been used on an archive, this archive is not closed. You must use:

Number of parts

zipNbPart is used to determine the number of sub-archives in a multi-part archive.

Actions that can be performed on a multi-part archive

Some archiving functions can only be used with single-part archives (add and delete files, create a self-extracting executable, etc.). To perform these operations, simply merge the sub-archives (<zipArchive variable>.Merge) to get a single-part archive.
From a multi-part archive, you can only:
WINDEVUser code (UMC)

The multi-part archive is found on diskettes

If the different sub-archives are found on diskettes, the next diskette will be automatically requested via a dialog box when the sub-archives are merged. An error will occur if the merge operation is canceled by the user (the multi-part archive is not found).
Component: wd300zip.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help