Ok....So there is no easy way to do this!!
I can only search one dir!! And when there is more then one folder...trouble!!
// This is the code I use to search current dir for additional folders!! One other problem is, that with the use of *. it will also list all files with no extension
//--------- note that I did not write this code my self most was found in the help files that came with BCB3 standard
#include <dir.h>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int done;
struct ffblk ffblk;
chdir("\\"

; // To make sure we read from root dir
done = findfirst("*.",&ffblk,faDirectory);
while (!done)
{
// only store directories, ignoring "." and ".."
char *impline;
impline = ffblk.ff_name;
if(impline[0]!='.') // another problem is that full pathname is not listed!!!
Memo1->Lines->Add(impline);
done = findnext(&ffblk);
}
}
//---------
A simple folder structure I am trying to use to find a solution!! It's gives more pain then help! {=P
C: |-Windows-|-System32-|-Folder
| |-Command-|Folder
|
|-Program files-|-ACDSee
| |-Internet Explorer-|-PLUGINS
|-Backup-|-System-|-Folder 1
| | |-Folder 2
| | |-Folder 3
Martin G Broman
mgb_svea@thevortex.com
DWS - Alpha Whitin Dead Wolf Society