Program Example43;

{ This program demonstrates the FindFirst function }

uses dos;

Var
    Info : SearchRec;
    Count : Longint;

Begin
  Count:=0;
  FindFirst ('i386/*.as',AnyFile,Info);
  While doserror=0 do
    begin
    Inc(Count);
    With Info do 
      Writeln (Name:40,Size:15);
    FindNext(info);
    end;
  FindClose(Info);
  Writeln ('Finished search. Found ',Count,' matches');
  
End.