Hi,
vielleicht hilft das auch noch
Delphi-Quellcode:
procedure EnumFiles( WildCard : string;
FileList : TStrings;
AddFiles : Boolean;
StripExtensions: boolean );
var
SRec : TSearchRec;
Error : DWORD;
begin
try
if Not AddFiles then
FileList.Clear;
Error := FindFirst( WildCard, faANYFILE, SRec );
while Error = 0 do
begin
if SRec.Attr and faDIRECTORY = 0 then
if not StripExtensions then
FileList.Add( SRec.Name )
else
FileList.Add( ChangeFileExt( SRec.Name, '' ) );
Error := FindNext( SRec );
end;
Sysutils.FindClose( SRec );
except
//
end;
end;
....
EnumFiles( FPath + '*.bmp',
Listbox.Items,
false ,
false);
EnumFiles( FPath + '*.jpg',
Listbox.Items,
true ,
false);
schon hat man alle bmp's und jpg's in der Listbox oder so ...
mfg Rumpi