PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Finding out the available disk space
fDriveInfo (Example)
Finding out the available disk space
The following code is used to find out the available disk space. The path of the disk is entered by the user in an edit control (EDT_DiskPath).
In this example, we assume that the user enters the full path of the disk (such as A:).
// -- Click code on BTN_AvailableSpace
// Declare the variable
ResAvailableSpace is int
// Available space?
ResAvailableSpace = fDriveInfo(EDT_DiskPath, fdFreeSpace)
// Error?
IF ResAvailableSpace <> 0 THEN
Info(ResAvailableSpace + "bytes available on this disk")
ELSE
// Display the error message
Error(ErrorInfo(errMessage))
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment