PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Finding out the size of a file
  • Finding out the size of a file (WEBDEV)
Finding out the size of a file
WINDEVReports and QueriesWindows MobileJavaUser code (UMC) The following code is used to find out the size of a file. The file name and path are selected by fSelect.
// Declare the variables
FilePath is string
ResSize is int
// Select a file
FilePath = fSelect("", "", "Selecting a file", ...
"All files (*.*)" + TAB + "*.*", "", fselOpen + fselExist)
// Retrieve the file size
ResSize = fSize(FilePath)
// Display an error message if the retrieval was not performed
IF ResSize = -1 THEN
Error(ErrorInfo(errMessage))
ELSE
  // Display the file size
  Info("Size of file: " + ResSize + " bytes")
END
Finding out the size of a file (WEBDEV)
WEBDEV - Server codePHPAjax The following code is used to find out the size of a file.
// Declare the variables
FilePath is string
ResSize is int
// Select a file
FilePath = "C:\MyDirectories\File.doc"
// Retrieve the file size
ResSize = fSize(FilePath)
// Display an error message if the retrieval was not performed
IF ResSize = -1 THEN
Error(ErrorInfo(errMessage))
ELSE
// Display the file size
Info("Size of file: " + ResSize + " bytes")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment