Registriert seit: 23. Jun 2003
416 Beiträge
Delphi 2006 Professional
|
Re: alle dateien eines ordners ausgeben
30. Jun 2004, 16:50
Hallo, herzlich willkommen in der Delphi-PRAXiS!
Das sollte etwa so gehen:
Delphi-Quellcode:
procedure FindAll(Path: String; List: TStringList);
var
SearchRec: TSearchRec;
begin
List.Clear;
if FindFirst(Path + '*.*', faAnyFile, SearchRec) = 0 then
repeat
List.Add(SearchRec.Name);
until FindNext(SearchRec) <> 0;
FindClose(SearchRec);
end;
[EDIT] Bin ich langsam
FindClose ergänzt[/EDIT]
"Electricity is actually made up of extremely tiny particles called electrons, that you cannot see with the naked eye unless you have been drinking." (Dave Barry)
|