PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Error codes
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
Opens an existing archive.
For the archives in "CAB" or "RAR" format, the archive is created if it does not exist.
The archive can be:
  • in WinZip or PKZip format (.ZIP extension).
  • in WINDEV format (.WDZ extension).
  • in Cabinet file format (.CAB extension).
  • in RAR format (.RAR extension).
  • Versions 18 and later
    in 7z format (.7z extension).
    New in version 18
    in 7z format (.7z extension).
    in 7z format (.7z extension).
  • Versions 21 and later
    in TAR format (.TAR extension).
    New in version 21
    in TAR format (.TAR extension).
    in TAR format (.TAR extension).
  • Versions 21 and later
    in TGZ format (.TGZ extension).
    New in version 21
    in TGZ format (.TGZ extension).
    in TGZ format (.TGZ extension).
  • Versions 21 and later
    in TAR.GZ format (.TAR.GZ extension).
    New in version 21
    in TAR.GZ format (.TAR.GZ extension).
    in TAR.GZ format (.TAR.GZ extension).
  • an executable (.EXE) corresponding to a .WDZ file changed into a self-extracting archive.
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 an archive
ResOpenArchive = zipOpen("MyArchive", "C:\MyArchives\Archive.zip")
// Display an error message if the archive was not opened
IF ResOpenArchive <> 0 THEN
        Error(zipMsgError(ResOpenArchive))
END
Windows Mobile
// Open an archive
ResOpenArchive = zipOpen("MyArchive", "\MyArchives\Archive.zip")
// Display an error message if the archive was not opened
IF ResOpenArchive <> 0 THEN
        Error(zipMsgError(ResOpenArchive))
END
Syntax
<Result> = zipOpen(<Archive> , <Archive Path> [, <Opening Mode>])
<Result>: Integer
  • 0 if the archive was opened,
  • An error code (value greater than 0) otherwise. See the Notes for more details.
<Archive>: Character string (with quotes) or zipArchive variable
Name of archive to open.
This name can correspond to:The archive is created if it does not exist (except for the "CAB" or "RAR" formats).
<Archive Path>: Character string (with quotes)
Path and name of archive (up to 260 characters). The archive extension can be specified. If the archive extension is not specified, the default extension is .WDZ.
AndroidAndroid Widget Windows MobileJava If the extension is not specified, the extension will be ".ZIP".
Universal Windows 10 App The archive path is a full path or a path relative to the working directory of application (returned by fDataDir).
<Opening Mode>: Optional constant (or combination of constants)
Opening mode of archive:
zipCreateIfNotFoundCreates the archive if it does not exist
(not available for .CAB and .RAR files)
zipWriteOpening in read/write
(not available for .CAB and .RAR files)
zipHeader64Allows you to create an archive exceeding 4 GB on which zipChangePath can be used.
AndroidAndroid Widget iPhone/iPadJava This constant is not available.
Versions 21 and later
Archive in TAR or TGZ (TAR.GZ) format: This constant is not available.
New in version 21
Archive in TAR or TGZ (TAR.GZ) format: This constant is not available.
Archive in TAR or TGZ (TAR.GZ) format: This constant is not available.
zipReadOpening in read-only
The default opening mode is: zipCreateIfNotFound + zipWrite.
Universal Windows 10 App This parameter is not available: the opening mode used corresponds to zipCreateIfNotFound + zipWrite.
Remarks

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.
  • 3: The archive is corrupted.
  • 6: The files of the sub-archives are not arranged in order (when opening a multi-part archive).
The message corresponding to the error code is returned by zipMsgError.
LinuxAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava Reminder: 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.
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