Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (string device in System.IO.Directory.GetLogicalDrives())
- {
- System.IO.DriveInfo dr = new System.IO.DriveInfo(device);
- if (dr.DriveType != System.IO.DriveType.Removable) continue;
- Console.WriteLine(dr.RootDirectory.ToString());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement