PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Use conditions
  • Error codes
  • Stored path of archive files
  • Zip files exceeding 4 GB
  • Subscript of files in the archive
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
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 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.
WINDEVWEBDEV - Server codeJavaAjaxUser code (UMC)
// Open an archive
ResOpenArchive = zipOpen("MyArchive", "C:\MyArchives\Archive.zip")
IF ResOpenArchive = 0 THEN
        ...
        // Modify the stored path of File.doc
        ResChangePath = zipChangePath("MyArchive", "File.doc", "Backup.doc")
        ...
END
Windows Mobile
// Open an archive
ResOpenArchive = zipOpen("MyArchive", "\MyArchives\Archive.zip")
IF ResOpenArchive = 0 THEN
        ...
        // Modify the stored path of File.txt
        ResChangePath = zipChangePath("MyArchive", "File.txt", "Backup.txt")
        ...
END
Syntax

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

<Result> = zipChangePath(<Archive Name> , <File Subscript> , <New File Path>)
<Result>: Integer
  • 0 if the modification was performed,
  • An error code (value greater than 0) otherwise. See Notes for more details.
<Archive Name>: Character string (with quotes)
Name of archive containing the file to modify (defined by zipOpen or zipCreate).
<File Subscript>: Integer
Subscript of file to modify. This subscript is returned by zipFindFile.
<New File Path>: Character string (with quotes)
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> , <File Path> , <New File Path>)
<Result>: Integer
  • 0 if the modification 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 archive where the file path must be modified.
This name can correspond to:
<File Path>: Character string (with quotes)
Stored path of the file to modify.
<New File Path>: Character string (with quotes)
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 (an archive is created by 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.
  • LinuxiPhone/iPad 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.

Error codes

The following error codes are returned:
  • 1: The path passed in 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 associated with the zipHeader64 constant.

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 (the subscript of an element is returned by zipFindFile).
  • the stored path of element.
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