473,396 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

list a folders contents along with ALL of its subdirectories

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
1 1430
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: AES/newspost | last post by:
My understanding -- I'm not an expert -- is that on (some? many? all?) standard Internet servers a URL can point to a subdirectory name followed by a backslash, and that links to this URL will...
8
by: RML | last post by:
hey guys, i am looking at this piece of code that lists numbers of files in a directory. i want to convert it so it lists the files in th directory that end with .doc. i cant seem to get it to...
2
by: melo | last post by:
Hello, I've been struggling with a function(s) to recursively set all folders and files to NOT read-only. So, I thought I'd post this message. What I need to do is: given a starting path, I...
1
by: Řyvind Isaksen | last post by:
I try to find som information about creating folders (and subfolders) on the webserver using asp.net (1.0). I have made a filuploader, and all files are now saved in the same folder on the...
3
by: idletask | last post by:
I have an application that has many windows. One window is used for order processing. I would like this window to display the other users who are also performing order processing (the idea is to...
11
by: frogman7 | last post by:
what i am trying to do is something similar to the search that windows does to find files and folders. I am putting a start directory and want to find all the file (including the files in the sub...
3
by: bmatznick | last post by:
I'm obviously new to this so here goes. I want to go into a folder on the c drive of windows, this folder has many other folders which have folders inside of them. What I want to do is get the name...
0
by: =?Utf-8?B?ZGIgY2hhbGxlbmdlZA==?= | last post by:
I am realy challenged by MSN Live. I was quite happy with my former hotmail. The new forced-upon-me version has caused me nothing but headaches and lots of work. It consumes huge amounts of my time...
9
by: kkhan5000 | last post by:
Hello, I am new to PHP and have put together the following code just by copying other examples from the web. Now I am stuck and would like to sort and display files alphabetically, and also filter...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.