Previous: 4.24.2.11. FindFirst To the Table of Contents Next: 4.24.2.13. FSearch
4.24.2.11. FindFirst Table of Contents 4.24.2.13. FSearch

- 4.24.2.12. -
Table of Contents
4. Standard Units
4.24. DOS - MSDOS support unit
4.24.2. DOS Unit Procedures and Functions
4.24.2.12. FindNext


4.24.2.12. FindNext

Targets: MS-DOS, OS/2, Win32


Dos Unit, WinDos Unit

Finds the next entry that matches the name and attributes specified in an earlier call to FindFirst.

Declaration:
procedure FindNext(var F: TSearchRec);
Remarks:
FindNext is used in conjunction with FindFirst. Use FindNext to locate any addition files matching the search criteria defined by a prior call to FindFirst. F must be the same variable that was passed to FindFirst. All errors are reported in DosError, which is a variable defined in the Dos unit.

Example:
uses
  Dos;
var
  DirRec : SearchRec;
begin
  FindFirst('C:\*.*',AnyFile,DirRec);
  while DosError = 0 do begin
    WriteLn(DirRec.Name);
    FindNext(DirRec);
  end;
end.
See also:
FSearch


Previous: 4.24.2.11. FindFirst To the Table of Contents Next: 4.24.2.13. FSearch
4.24.2.11. FindFirst Table of Contents 4.24.2.13. FSearch

- 4.24.2.12. -