PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Reminder
  • Example of extracted path
  • Stored path
  • 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
Returns the path of a file found in the archive. This archive can be in ZIP, CAB, RAR, WDZ or 7z format.
This path corresponds to the stored path when the file is added into the archive (zipAddFile or zipAddDirectory).
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.
WINDEVWEBDEV - Server codeReports and QueriesJavaAjaxUser code (UMC)
// Open the archive named "Archive"
ResOpenArchive = zipOpen("Archive", "D:\Backups\Backup.zip")

IF ResOpenArchive = 0 THEN
...
// Find the "File.doc" file
ResFileFound = zipFindFile("Archive", "File.doc")
// File path found
ExtractPath = zipExtractPath("Archive", ResFileFound, zipDirectory)
...
END
Windows Mobile
// Open the archive named "Archive"
ResOpenArchive = zipOpen("Archive", "\Backups\Backup.zip")
IF ResOpenArchive = 0 THEN
...
// Find the "File.txt" file
ResFileFound = zipFindFile("Archive", "File.txt")
// File path found
ExtractPath = zipExtractPath("Archive", ResFileFound, zipDirectory)
...
END
Syntax
<Result> = zipExtractPath(<Archive> , <File Subscript> [, <Path Section to Extract>])
<Result>: Character string
Requested path section.
<Archive>: Character string (with quotes) or zipArchive variable
Name of archive to use.
This name can correspond to:
<File Subscript>: Integer
Subscript of file in the archive. This subscript is returned by zipFindFile.
<Path Section to Extract>: Optional constant (or combination of constants)
Section of file path to extract:
zipDriveReturns the unit name only (WDZ format only). This constant has no effect for the archives whose type differs from WDZ.
LinuxiPhone/iPadWindows Mobile This constant is not available. Indeed, there is no root in the paths of directories.
AndroidAndroid Widget Java This constant is ignored.
zipExtensionReturns the extension of the file (preceded by ".")
zipFilenameReturns the name of the file (without its extension)
zipDirectoryReturns the different directories of the file (the name and the extension of the file are not returned)
By default, the extracted path corresponds to the stored path.
Universal Windows 10 App This parameter is not available: only the name of the file and its extension are stored and therefore can be extracted.
Remarks

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.

Example of extracted path

If the stored path is "C:\Temp\Data\File.txt", zipExtractPath returns:
  • zipExtension: .txt
  • zipFilename: File
  • zipDirectory: \Temp\Data\
  • zipDrive: C:
  • zipFilename+zipExtension: File.txt
  • zipDirectory+zipFilename: \Temp\Data\File
  • ...
AndroidAndroid Widget Java The zipDrive constant is ignored.
Universal Windows 10 App Only the name of the file and its extension can be extracted.
Archives in 7z format: The "\" character (beginning of the path) is not returned.

Stored path

The table below presents the paths stored in the archive according to:
  • the access path to the file,
  • the stored path section.
The current directory is: "C:\Temp".
zipAddFileFile locationzipNonezipDirectoryzipDrive
zipAddFile("Archi",...
"File.txt")
C:\Temp\File.txtFile.txtFile.txtFile.txt
zipAddFile("Archi",...
"Data\File.txt")
C:\Temp\Data\File.txtFile.txtData\File.txtData\File.txt
zipAddFile("Archi",...
"D:\Data\File.txt")
D:\Data\File.txtFile.txtData\File.txtD:\Data\File.txt
Note: If the zipDrive constant is used:
  • the WDZ format stores the full path of the file (including the drive letter).
  • the ZIP format does not store the drive letter.
  • the 7z format stores the directories only.
Java The zipDrive constant is ignored.
Universal Windows 10 App The directory and the disk are not stored in the archive path. Only the file name and extension are stored.
Windows Mobile The table below presents the paths stored in the archive according to:
  • the access path to the file,
  • the stored path section.
zipAddFileFile locationzipNonezipDirectory
zipAddFile("Archi",...
"\File.txt")
\File.txtFile.txtFile.txt
zipAddFile("Archi",...
"\Temp\File.txt")
\Temp\File.txtFile.txtTemp\File.txt

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