procedure TForm1.GetHtmFile; var sr:TSearchRec; fr:Integer; begin if WorkingDir = '' then Exit; fr:=FindFirst(WorkingDir+'\*.htm',faAnyFile,sr); if fr=0 then repeat if (sr.Attr <> faDirectory) then begin ListBox1.Items.Add(sr.Name); FileList.Add(WorkingDir+'\'+sr.Name); end; until SysUtils.FindNext(sr) <> 0; FindClose(sr); end;
var
sr:TSearchRec;
fr:Integer;
begin
if WorkingDir = '' then Exit;
fr:=FindFirst(WorkingDir+'\*.htm',faAnyFile,sr);
if fr=0 then
repeat
if (sr.Attr <> faDirectory) then begin
ListBox1.Items.Add(sr.Name);
FileList.Add(WorkingDir+'\'+sr.Name);
end;
until SysUtils.FindNext(sr) <> 0;
FindClose(sr);
end;