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!

How to get subdirectories?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I was wondering how I can get the subdirectories of any directory?
 
You need to use FindFirst() and FindNext().

Pass the initial directory to FindFirst and compare the results against the faDirectory Attribute and then do a loop with FindNext, again testing each result against faDirectory. Look in the online help for these two calls to get an idea and an example.
 
You can do this without a lot of programming by using the DirectoryListbox component on the W3.1 tab
Set the root dir you require and read the items from the items list.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top