Hey All,
My problem appears to be pretty simple. I need a way of listing all the folders that exist in a certain directory. By all the folders, I mean ALL the folders; any file folder that exists underneath a certain directory needs to be returned, no matter how deep it lies. So, for example,
2 folders in drive X:, one called 'Names' the other called 'Addresses'
'Names' contains 3 different folders, each of which has 2 subfolders of its own
'Addresses' contains 2 different folders, which have no subfolders.
I'm searching for a way to return all the folder paths to a single array. Is there a simple method that accomplishes this? I've been playing around with 'System.IO.Directory.GetDirectories', but this allows me to only drill down one layer, so to speak.
This seems to me like it would be a pretty common task, so I'm curious as to why I can't seem to find a solution on the net (perhaps my googling skills are sub par) Any help would be fantastic.
Running Visual Studio 2005, on XP Pro, .NET Framework 2.0
Thanks Guys/Gals.