Board index » cppbuilder » How to know the disk free space of a drive
Christophe MINETTI
![]() CBuilder Developer |
Christophe MINETTI
![]() CBuilder Developer |
How to know the disk free space of a drive2005-04-07 03:32:11 PM cppbuilder99 Hi, I would like to know how to get the disk free space of a specific hard drive. I get the ID of this drive by a TDriveComboBox. I tried to use the function DiskFreeSpace(byte aDrive) but how to make the link between aDrive and the actual Drive listed from the TDriveComboBox ? Many thanks in advance. Christophe |
Andrue Cope [TeamB]
![]() CBuilder Developer |
2005-04-07 04:08:27 PM
Re:How to know the disk free space of a drive
Christophe MINETTI wrote:
QuoteI would like to know how to get the disk free space of a specific hard QuoteI tried to use From the help:"DiskFree returns the number of free bytes on the specified drive, where 0 = Current, 1 = A, 2 = B, and so on." Alternatively since you have posted to the .native API you could use GetDiskFreeSpace() which is an API call. Here it's even easier. This function whats the root directory so just take the drive letter returned by the combo box and append ":\\". -- Andrue Cope [TeamB] [Bicester, Uk] info.borland.com/newsgroups/guide.html |