PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Use conditions
  • Error codes
  • Stored path of archive files
  • Zip files exceeding 4 GB
  • Index of files in the archive
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Modifies the stored path of a file in an archive (in ZIP, WDZ or 7z format). Used to configure the extraction path of file.
Versions 18 and later
Windows This function now supports the 7z format.
New in version 18
Windows This function now supports the 7z format.
Windows This function now supports the 7z format.
Syntax

Changing the stored path of a file identified by its index Hide the details

<Result> = zipChangePath(<Archive name> , <File index> , <New file path>)
<Result>: Integer
  • 0 if the modification was performed,
  • An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
<Archive name>: Character string
Name of archive containing the file to modify (defined by zipOpen or zipCreate).
<File index>: Integer
Index of the file to modify. zipFindFile returns this index.
<New file path>: Character string
New path to store for the file (up to 260 characters).

Modifying the stored path of a file identified by its path Hide the details

<Result> = zipChangePath(<Archive> , <New file path>)
<Result>: Integer
  • 0 if the modification was performed,
  • An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
<Archive>: Character string or zipArchive variable
Name of archive where the file path must be modified.
This name can correspond to:
  • an archive name defined with zipOpen or zipCreate.
  • Versions 15 and later
    Reports and Queries the name of a variable of type zipArchive.
    New in version 15
    Reports and Queries the name of a variable of type zipArchive.
    Reports and Queries the name of a variable of type zipArchive. $+ File path | Character string) |
Stored path of the file to modify.
<New file path>: Character string
New path to store for the file (up to 260 characters).
Remarks

Use conditions

The path of an archive file can be modified if:
  • The archive exists (archives are created using zipCreate).
  • The archive is accessible in read/write.
  • The archive is a single-part archive.
Caution:
  • Archives in CAB format: This function is not available. This format cannot be used to store the path of a file.
  • Archives in RAR format: This function is not available.
  • Archives in TAR and TGZ (TAR.GZ) format: This function is not available.
  • Archives in 7z format: The archive is entirely compressed whenever zipChangePath is called.

Error codes

The following error codes are returned:
  • 1: The path passed as parameter does not exist.
  • 3: The archive is corrupted.
The message corresponding to the error code is returned by zipMsgError.

Stored path of archive files

When adding a file into an archive (zipAddFile and zipAddDirectory), the section of file path that must be stored in the archive is specified.
The modified path does not necessarily contain the same sections as the initial path. For example, if the paths of the files contain the different directories as well as the name and extension of the file, the new path may only contain the name and extension of the file.

Zip files exceeding 4 GB

To use zipChangePath on files exceeding 4 GB, the archive must have been created by zipCreate with the constant zipHeader64.

Index of files in the archive

When a file is added into an archive, an index is automatically assigned to the file. This index corresponds to the order in which the files are included in the archive. To select a file in the archive, you can use:
  • the index of the element (the index of an element is returned by zipFindFile).
  • the stored path of element.
Business / UI classification: Business Logic
Component: wd270zip.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment