ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Archive functions
  • Overview
  • Handling the archives
  • Type of archives
  • Examples
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
Overview
WINDEV, WEBDEV and WINDEV Mobile propose several WLanguage functions allowing you to compress and merge your files into archives.
An archive is a physical file:
  • whose type is ".WDZ" for a WINDEV, WEBDEV or WINDEV Mobile archive.
  • whose type is ".ZIP" for a WinZip or PKZip archive.
  • whose type is ".CAB" for a "Cabinet Files" archive.
  • whose type is ".RAR".
  • whose type is ".7z".
  • whose type is ".tar" or ".tgz" (".tar.gz").
This file groups all types of files (".pdf", ".fic", ".mmo", ...) automatically compressed.
For example, the archives allow you to:
  • save your files on a regular basis while reducing the storage space,
  • simplify the transmission of your files on Internet/Intranet,
  • create self-extracting archives,
  • ...
An optimized compression allows your files to occupy less disk space and be easily transmitted on different media (CD, Internet, etc.).
Two types of archives are available:
Handling the archives
To manage your archives, WINDEV, WEBDEV and WINDEV Mobile propose several WLanguage functions. These functions are used to:
  • handle the archives: creation, opening, closing.
  • handle the files found in the archive: add and compress files (single file or set of files in a directory), extract and decompress a file, delete files from an archive.
  • get various information about the archives and about the compressed files: size before and after compression, ...
  • split and/or merge archive volumes.
  • create self-extracting archives.

Type of archives

  • The ".WDZ" archives are available in WINDEV (32-bit and 64-bit executable) and WEBDEV.
  • The ".ZIP" archives (WinZip or PKZip) are available in WINDEV (32-bit and 64-bit executable), WEBDEV, WINDEV Mobile, Java and Linux.
  • The ".CAB" archives ("Cabinet files") are available in WINDEV (32-bit executable only) and WEBDEV.
  • The ".RAR" archives are available in WINDEV, WEBDEV and WINDEV Mobile.
    remark: RAR archives are supported up to and including version 4.
  • The ".7z" archives are available in WINDEV (32-bit and 64-bit executable) and WEBDEV.
  • The ".tar" or ".tgz" archives (".tar.gz") are available in WINDEV (32-bit executable only) and WEBDEV.
Remarks:
  • The size of the ".WDZ" archives cannot exceed 4 GB.
  • The archives in".CAB" format are necessarily single-part archives.
Examples
To save the database of your customer, your program creates a backup archive. The files to save are compressed into the archive.

The archive is then split into several parts.

To simplify the use of backup files: create a self-extracting archive. Simply run the archive to automatically decompress all the files.
Related Examples:
The Zip functions Unit examples (WEBDEV): The Zip functions
[ + ] This example explains how to use the ZIP functions to create compressed archives.
These archives can have one of the following formats:
- WDZ
- ZIP
- or 7z
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 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help