Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. foreach (string device in System.IO.Directory.GetLogicalDrives())
  2. {
  3. System.IO.DriveInfo dr = new System.IO.DriveInfo(device);
  4. if (dr.DriveType != System.IO.DriveType.Removable) continue;
  5. Console.WriteLine(dr.RootDirectory.ToString());
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement