PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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.")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment