System drives information

puma

Active member
Joined
May 17, 2004
Messages
25
Location
Bucharest, Romania
Is there any way to access drive information (letter, type, label, IsReady, Serial No,...) in .NET, other than using Windows Scripting Hosts FileSystemObject?
 
Code:
		For Each sDrive In Directory.GetLogicalDrives()
			Console.WriteLine(sDrive)
		Next
Gives you the logical drives.
 
The .Net framework versions 1.0 and 1.1 dont appear to provide any classes for getting at drive information - however in the 2.0 framework there is a DriveInfo class that seems to provide the functionality you require.
 
Back
Top