ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Archive functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Archiving functions (ZIP, WDZ, CAB, RAR, 7z, TAR, gzip, etc.) (prefix syntax)
New in version 2025
Windows gzip (.gz extension) is now supported.

The following WLanguage functions are used to create and manage archives in prefix syntax:
<zipArchive variable>.AddDirectoryAdds all the files found in a directory and in its subdirectories into an archive and compresses them.
<zipArchive variable>.AddFileAutomatically adds and compresses any type of file into a CAB, ZIP, WDZ, 7z, TAR, gzip or TGZ (TAR.GZ) archive.
<zipArchive variable>.AddFileListAutomatically adds and compresses a list of files into a ZIP, CAB, WDZ, 7z, TAR, gzip or TGZ (TAR.GZ) archive.
<zipArchive variable>.ChangePathModifies the stored path of a file in an archive (in ZIP, WDZ or 7z format).
<zipArchive variable>.CloseCloses an archive.
<zipArchive variable>.CreateCreates an archive.
<zipArchive variable>.CreateExeCreates a self-extracting archive as a 32-bit executable (.EXE).
<zipArchive variable>.CurrentFileReturns the name of the archived file currently handled by the functions for adding and extracting files.
<zipArchive variable>.DeleteAllDeletes all files from an archive.
<zipArchive variable>.DeleteFileDeletes a file from an archive.
<zipArchive variable>.DeleteFileListDeletes a list of files from an archive.
<zipArchive variable>.EndAddingFileDeclares the end of the optimized addition of a series of files to an archive.
This new function is available from WINDEV Suite SaaS 2025 - Update 3.
<zipArchive variable>.ExistDetermines whether an archive exists.
<zipArchive variable>.ExtractAllExtracts all files from an archive and decompresses them.
<zipArchive variable>.ExtractDirectoryAutomatically extracts and decompresses files from a directory in the file tree of an archive to a physical location.
<zipArchive variable>.ExtractFileExtracts a file from an archive and automatically decompresses it to a physical location or in memory.
<zipArchive variable>.ExtractFileListExtracts and decompresses a list of files found in an archive to a physical location.
<zipArchive variable>.ExtractPathReturns the path of a file found in the archive.
<zipArchive variable>.FileSizeReturns the size of one of the archive files (in CAB, RAR, WDZ, ZIP, 7z, gzip, TAR or TGZ (TAR.GZ) format):
  • the compressed size of the file.
  • the size of file before compression.
<zipArchive variable>.FindFileSearch for a file in an archive (CAB, ZIP, RAR, WDZ, 7z, gzip, TAR or TGZ (TAR.GZ) format).
<zipArchive variable>.InfoFileReturns the characteristics of a file found an archive:
  • The name of the file and its stored path.
  • The initial size of the file.
  • The compressed size of file.
  • The date and time of file creation.
  • The date and time of file modification.
  • The date and time of file access.
  • The file attributes.
  • The file encryption mode.
<zipArchive variable>.IsMultiReturns the type of the archive: single-part archive or multi-part archive.
<zipArchive variable>.ListFileReturns the list of files found in an archive.
<zipArchive variable>.MergeMerges the different sub-archives found in a multi-part archive to create a single-part archive.
<zipArchive variable>.NbPartNeededReturns the number of parts of a given size required to split a single-part archive.
<zipArchive variable>.OpenOpens an existing archive.
<zipArchive variable>.OpenCABOpens an existing archive in CAB format.
<zipArchive variable>.OpenRAROpens an existing archive in RAR format.
<zipArchive variable>.SplitSplits an archive into several sub-archives of a given size.
<zipArchive variable>.StartAddingFileDeclares the start of the optimized addition of files to a CAB, ZIP, WDZ, 7z, TAR, gzip or TGZ (TAR.GZ) archive.
This new function is available from WINDEV Suite SaaS 2025 - Update 3.
<zipArchive>.SelectFileSelects files from an archive.
Note: Archiving functions can be used in a thread without blocking other threads during execution.
Related Examples:
The ZIP functions Unit examples (WINDEV): The ZIP functions
[ + ] Using the compression/decompression functions of WINDEV:
- Create an archive
- Add files into an archive
- Read the content of an archive
- Extract files from an archive
WD Zip Complete examples (WINDEV): WD Zip
[ + ] This example presents the use of archiving WLanguage functions with compression.
The following topics are presented in this example:
1/ How to create an archive?
2/ How to compress and uncompress files?
3/ How to manage Drag&Drop from the file explorer of Windows to a TreeView control?
Summary of the example supplied with WINDEV:
This example allows you to create and read compressed archives in WDZ, ZIP, CAB and RAR format (in read-only). This feature can be very useful to manage the automatic backups. Furthermore, the example allows you to create multi-volume archives.
Android ZIP Android (WINDEV Mobile): Android ZIP
[ + ] This example is used to browse the folder of the Android device while searching for ZIP archives.
The archives can be browsed and extracted into a directory of the device.
The folders and the files found in the archive can be extracted individually.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/15/2025

Send a report | Local help