Aha und das:
Delphi-Quellcode:
public
procedure GetFiles(const Path: string);
{ Public-Deklarationen }
procedure TForm1.GetFiles(const Path: string);
var
SearchRec: TSearchRec;
p: string;
begin
Label1.Caption:='';
p := path + '*.*';
if FindFirst(p, faAnyFile, SearchRec) = 0 then
begin
repeat
if (SearchRec.Attr and faDirectory) = faDirectory then
begin
if (SearchRec.Name <> '.') and (SearchRec.Name <> '..') then
GetFiles(Path + SearchRec.Name + '\');
end
else begin
Form1.Memo1.Lines.Add(Path + SearchRec.Name);
a:=a+1;
Refresh;
Application.ProcessMessages;
ProgressBar1.StepIt;
end;
until
FindNext(SearchRec) <> 0;
FindClose(SearchRec);
end;
ProgressBar1.Position:=0;
Label1.Caption:=IntToStr(a) +' Dateien gescannt';
end;
brauche ich nicht mehr ????