Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Finding out the size of a file before compression
fSizeUncompressed (Example)
Finding out the size of a file before compression
The following code is used to find out the size of a file before compression.
// Declare the variables
FilePath is string
ResDecompressedSize is int
// Select a file
FilePath = "C:\MyDirectories\File.do_"
// Retrieve the size of the file before compression
ResDecompressedSize = fSizeUncompressed(FilePath)
// Display an error message if the retrieval was not performed
SWITCH ResDecompressedSize
CASE -1: Error(ErrorInfo(errMessage))
CASE -2: Info("This file was not compressed by fCompress." + ...
 "Unable to find out its size before compression.")
// Display the file size before compression
OTHER CASE: Info("Size of the file before compression: " + ResDecompressedSize + " bytes.")
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 08/22/2022

Send a report | Local help