ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Error codes
  • Progress Bar
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Compresses a file. This file can be decompressed by fUncompress.
Note: Small files are unlikely to be compacted.
Reminder Archiving functions (zipXXX functions) can be used to manage archives in ZIP, CAB, 7z, etc. format.
// Compression d'un fichier
Res = fCompress("C:\Répertoires\Fichier.txt", "C:\Répertoires\FichierCompressé.txt")
Syntax
<Result> = fCompress(<Path of file to compress> , <Path of compressed file>)
<Result>: Integer
  • 0 if the compression was performed,
  • an error code (value greater than 0) otherwise.
<Path of file to compress>: Character string
Name and full (or relative) path of the file to compress (up to 260 characters). A UNC path can be used.
<Path of compressed file>: Character string
Name and full (or relative) path of compressed file (up to 260 characters). A UNC path can be used.
Remarks

Error codes

The following error codes are returned:
  • 1: The file to be compressed cannot be opened.
  • 2: Unable to create compressed file. This error occurs if <Path of compressed file> does not exist.
  • 4: The file cannot be compressed: it is simply copied (for example, the size of the file to be compressed is too small).
  • 5: Not enough memory available for compression.
  • 6: Compression has been aborted by the user: function fStopCompress has been executed.
  • 7: Not enough space to create the compressed file.
The error code message can be retrieved using the ErrorInfo function with the rrMessage constant.

Progress Bar

To view the progress of file compression, use Event to process the GaugeCompaction message (1174). When this message is received, the _EVE.wParam variable contains the percentage of file compression.
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help