(Gast)
n/a Beiträge
|
Re: Frage zu FindFirst
27. Dez 2005, 13:17
Hi,
Delphi-Quellcode:
procedure DirShow (SearchDir, SearchFile : string;
var FileList : TStringList);
var
i : Integer;
SearchRec : TSearchRec;
begin
if SearchDir[Length(SearchDir)] <> '\' then SearchDir := SearchDir + '\';
i := FindFirst(SearchDir + SearchFile, faDirectory, SearchRec);
while i = 0
do begin
if (SearchRec.Name <> '.')
and
(SearchRec.Name <> '..')
then begin
if FileExists(SearchDir + SearchRec.Name)
then FileList.Add(SearchDir + SearchRec.Name);
end;
i := FindNext(SearchRec);
end;
FindClose(SearchRec);
end;
|
|
Zitat
|