Board index » delphi » listing all files in a directory including subdirectories

listing all files in a directory including subdirectories

Quote
On Sat, 26 Aug 2000 01:24:18 +0800, "Detonate" <deton...@start.com.au> wrote:
>does anyone have any source for Borland c++ builder

Post Builder questions in one of the .cppbuilder. groups.
This one and others with .cpp. in the name are for issues re
the pre-Builder C++ compilers.

--
Wayne A. King
(ba...@torfree.net, wayne.k...@ablelink.org,
 wak...@idirect.com, Wayne_A_K...@compuserve.com)

 

Re:listing all files in a directory including subdirectories


does anyone have any source for Borland c++ builder (im using v3) that will
list all files in a directory including subdirectories ?

Re:listing all files in a directory including subdirectories


Quote
Detonate wrote:
> does anyone have any source for Borland c++ builder (im using v3) that will
> list all files in a directory including subdirectories ?I've v4, but I'll
> answer in case you also have this component.

Detonate,

For Win3.1 TFileListBox

FileListBox1->Directory = String(Path);
int i, size = FileListBox1->Items->Capacity; // num files in directory
for( i = 0 ; i < size ; i++ )
{
    FileListBox1->ItemIndex = i;  // set index in filelist to i
    String File = FileListBox1->FileName;  // absolute path of file

    { ... do whatever with file ... }

Quote
}

There is another component DirectoryListBox that probably can be manipulated
simarly to get list of directories.

Other Threads