Solved

walk down a folder structure recursively

Posted on 1998-05-27
2
174 Views
Last Modified: 2010-04-06
Is there somewhere a component or an object pascal exemple, which helps
me to walk down a folder structure recursively? I would like to notice
each filename and foldername (inc. date) found in this structure for later usage.

Any hint is welcome !
0
Comment
Question by:rjufer
2 Comments
 
LVL 4

Accepted Solution

by:
d003303 earned 100 total points
ID: 1348049
Yo,
create a recursive function in your main function that adds e.g. the complete path with filename to a list.
A quick flow-example without syntax warranty:

procedure RecurseDirs(Dir : string; List : TStringList);
 procedure Recurse(ADir : string);
 begin
   ( FindFirst/FindNext loop stuff )
   ( check if file is a directory )
   ( if yes, call Recurse(ADir + '\DirName') )
   ( if no, add file to list )
   ( end of loop )
 end;
begin
  Recurse(Dir);
end;

Slash/d003303
0
 

Author Comment

by:rjufer
ID: 1348050
Thanks very mutch.

Rolf
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi OLE Error 8 95
TVirtualStringTree  search using TEdit 7 106
drawing animated level bar based on numbers 3 88
Unique identifier on a terminal server (rdp) 4 46
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now