Delphi-Quellcode:
var
searchResult : TSearchRec;
begin
// Try to find regular files matching Unit1.d* in the current dir
if FindFirst('Unit1.d*', faAnyFile, searchResult) = 0 then
begin
repeat
ListBox1.Items.Add(searchResult.name);
until FindNext(searchResult) <> 0;
// Must free up resources used by these successful finds
FindClose(searchResult);
end;
end;
in etwa so, mußt es nur Deinen Bedingungen anpassen.
Aber hatten wir das nicht schonmal hier ->
http://www.delphipraxis.net/internal...876&highlight=
Grüße
Klaus