Detecting number of drives

  • Thread starter Thread starter HardySpicer
  • Start date Start date
H

HardySpicer

Some pcs have only the c drive whilst others like mine have c,d,e,f
and z! How do I detect this automatically if I want to search all
drives in a pc? I also want to ignore the DVD and floppy of course.

regards

Hardy
 
HardySpicer said:
Some pcs have only the c drive whilst others like mine have c,d,e,f
and z! How do I detect this automatically if I want to search all
drives in a pc? I also want to ignore the DVD and floppy of course.

regards

Hardy

Public Shared Function GetDrives() As System.IO.DriveInfo()
Member of: System.IO.DriveInfo
Summary:
Retrieves the drive names of all logical drives on a computer.

Return Values:
An array of type System.IO.DriveInfo that represents the logical drives on a
computer.

Remember that the object browser is your friend.

Hope this helps
Lloyd Sheen
 
Lloyd Sheen said:
Public Shared Function GetDrives() As System.IO.DriveInfo()
Member of: System.IO.DriveInfo
Summary:
Retrieves the drive names of all logical drives on a computer.

In addition, you can determine the drive type via the 'DriveInfo' object's
'DriveType' property.
 
Back
Top