_dos_findnext
Continues _dos_findfirst search.
Defined in header <dos.h>
Syntax
#include <dos.h>
unsigned _dos_findnext(struct find_t *ffblk);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
_dos_findnext is used to fetch subsequent files that match the pathname given in _dos_findfirst. ffblk is the same block filled in by the _dos_findfirst call. This block contains necessary information for continuing the search. One file name for each call to _dos_findnext will be returned until no more files are found in the directory matching the pathname.
Return value
_dos_findnext returns 0 on successfully finding a file matching the search pathname. When no more files can be found, or if there is some error in the file name, the DOS error code is returned, and the global variable errno is set to ENOENT Path or file name not found
See also
Example
#include <stdio.h>
#include <dos.h>
int main(void)
struct find_t ffblk;
int done;
printf("Directory listing of *.*\n");
done = _dos_findfirst("*.*",_A_NORMAL,&ffblk)
while (!done) {
printf(" %s\n", ffblk.name);
done = _dos_findnext (&ffblk);
}
return
Program output
Directory listing of *.*
FINDFRST.C
FINDFRST.OBJ
FINDFRST.MAP
FINDFRST.EXE
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Extraction notes
- heading `dos findnext` read as `_dos_findnext`
Stable link: /3.1/dos.h/_dos_findnext/
· short form /3.1/_dos_findnext/