Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<string> dirs = new List<string>(Directory.GetDirectories("C:\\"));
- string[] t;
- for(int i = 0; i < dirs.Count; i++)
- {
- try
- {
- t = Directory.GetDirectories(dirs[i]);
- foreach(string q in t)
- {
- dirs.Add(q);
- }
- }
- catch
- {
- continue;
- }
- }
- dirs.Sort();
- for(int i = 0; i < dirs.Count; i++)
- {
- Console.WriteLine(dirs[i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement