- Finding out the available disk space
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)
IF ResAvailableSpace <> 0 THEN
Info(ResAvailableSpace + "bytes available on this disk")
// Display the error message
This page is also available for…