Solved

walk down a folder structure recursively

Posted on 1998-05-27
2
173 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

16 Experts available now in Live!

Get 1:1 Help Now