Previous: 4.74.2.8. FindFirst procedure To the Table of Contents Next: 4.74.2.10. FileSearch function
4.74.2.8. FindFirst procedure Table of Contents 4.74.2.10. FileSearch function

- 4.74.2.9. -
Table of Contents
4. Standard Units
4.74. WinDos - MS-DOS function emulation for OS/2 and Win32
4.74.2. WinDos Unit Procedures and Functions
4.74.2.9. FindNext procedure


4.74.2.9. FindNext procedure

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
  WinDos;
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.74.2.8. FindFirst procedure To the Table of Contents Next: 4.74.2.10. FileSearch function
4.74.2.8. FindFirst procedure Table of Contents 4.74.2.10. FileSearch function

- 4.74.2.9. -