Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing files in (sub)directories

Status
Not open for further replies.

markSaunders

Programmer
Jun 23, 2000
196
0
0
GB
Hi all,

I have a requirement to provide a list (txt, excel or whatever) of all the files with their relative path for a specified directory and its subdirectories such that the list may look something like this...
Code:
\test\suba\one.doc
\test\suba\two.xls
\test\suba\three.rtf
\test\subb\four.txt
\test\subb\five.cfm
\test\subb\six.doc
\test\subb\subsuba\seven.txt
\test\subb\subsuba\eight.doc
\test\subb\subsuba\nine.pdf
Any advice or pointers would be splendid!

cheers
m
Mark Saunders :)
 
You might want to take a look at the following thread:

thread222-358873

That thread shows code (as amended in later posts in the thread) for recursively walking a directory, identifying all files which meet a certain file specification. You will, for your app, need to set the file spec accordingly (perhaps *.*), and choose the parent directory from which you want to start your search. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top