Информатика. Программирование в Delphi
306
dir:=dir+'\';
if FindFirst(tp,faAnyFile,searchrec)=0 then
repeat
filelist.Add(Dir+searchrec.Name);
inc(count);
until FindNext(searchrec)<>0;
if FindFirst('*',faAnyFile,searchrec)=0 then
repeat
if searchrec.Attr and faDirectory=faDirectory then
if searchrec.Name[1]<>'.' then
begin
ChDir(searchrec.Name);
find(GetCurrentDir,tp,filelist,count);
ChDir('..');
end;
until FindNext(searchrec)<>0;
end
else
begin
filelist.Add('Каталог не найден...');
count:=0;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Form1.BorderStyle:=bsDialog;
LabeledEdit1.Text:='c:\';
LabeledEdit2.Text:='*.jpg';
Memo1.ScrollBars:=ssBoth;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
dir:string;
begin
if SelectDirectory('Выберите каталог для поиска','',dir) then
if dir<>'' then
LabeledEdit1.Text:=dir;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
filelist:TStringList;
I...,296,297,298,299,300,301,302,303,304,305 307,308,309,310,311,312,313,314,315,316,...370