Get free disk space

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Does somebody knows how to get the disk free space? The code sample from visual studio works, but it is to much slow..

Thanks in advance
 
* "=?Utf-8?B?bHR0MTk=?= said:
Does somebody knows how to get the disk free space? The code sample
from visual studio works, but it is to much slow...

Which sample?

Add a reference to "System.Management.dll", then import the
'System.Management' namespace:

\\\
Dim disk As New ManagementObject("Win32_LogicalDisk.DeviceID=""C:""")
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine("{0} = {1}", diskProperty.Name, diskProperty.Value)
Next diskProperty
///
 
Back
Top