By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,655 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,655 IT Pros & Developers. It's quick & easy.

list a folders contents along with ALL of its subdirectories

P: n/a
Hi:

What would be a quick way to iterate through a folder and all of its
subfolders, not just its immediate folders? Is there a way to use the
GetDirectories method and have it cascade through all subfolders or is there
a better way?

Thanks!
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Tarren" <no*****@thankyou.com> schrieb:
What would be a quick way to iterate through a folder and all of its
subfolders, not just its immediate folders? Is there a way to use the
GetDirectories method and have it cascade through all subfolders or is
there a better way?


Typically file/folder enumeration is done using a recursive enumeration
algorithm:

FileSystemEnumerator
<URL:http://dotnet.mvps.org/dotnet/samples/filesystem/FileSystemEnumerator.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.