Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2006 Aug : Available disk space on named drive?

www.cryer.info
Managed Newsgroup Archive

Available disk space on named drive?

Subject:Available disk space on named drive?
Posted by:"Jacob Havkrog" (a@a.a)
Date:Fri, 25 Aug 2006 12:14:12

Hi group

I need to know the amount of available free disk space on a drive, where I
only know the assigned drive letter.

In Delphi 5, I can find the function

>function DiskFree(Drive: Byte): Int64;

>DiskFree returns the number of free bytes on the specified drive, where 0 =
>Current, 1 = A, 2 = B, and so on.
>DiskFree returns -1 if the drive number is invalid.

But thats not to much help, if I don't know, what the drive index is. I only
know the drive letter, eg. "H:".

Can you help? I use Delphi 5.
Thanks
Jacob

Replies:

www.cryer.info
Managed Newsgroup Archive