drive name [modified]
-
Is there a way to get a the name of the logical drive? Not the drive letter, but the name. For example, the drive C: usually appears in under My Computer as "Local Disk ( C: )". How would I obtain the "Local Disk" text? I love to program!
Give a try to WMI. There are some CP articles about WMI in C#: start here. Best, Jun
-
Is there a way to get a the name of the logical drive? Not the drive letter, but the name. For example, the drive C: usually appears in under My Computer as "Local Disk ( C: )". How would I obtain the "Local Disk" text? I love to program!
-
Is there a way to get a the name of the logical drive? Not the drive letter, but the name. For example, the drive C: usually appears in under My Computer as "Local Disk ( C: )". How would I obtain the "Local Disk" text? I love to program!
All very good answers, however the codeproject reference gets the drive letter, as does the DriveInfo class for C# 2005. Lets say you plug in an external hard-drive and assign it the drive letter (which is the Name property of the DriveInfo class and the ManagementObject["name"] property for WMI) "V:", and you also name it "External hard-drive". How would I get the "External hard-drive" text? I love to program!
-
All very good answers, however the codeproject reference gets the drive letter, as does the DriveInfo class for C# 2005. Lets say you plug in an external hard-drive and assign it the drive letter (which is the Name property of the DriveInfo class and the ManagementObject["name"] property for WMI) "V:", and you also name it "External hard-drive". How would I get the "External hard-drive" text? I love to program!
That's the VolumeLabel property of the DriveInfo class. Dave Kreskowiak Microsoft MVP - Visual Basic