Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>findnext() fetch files that match findfirst()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 findnext()              Fetch Files That Match findfirst()

 #include   <dir.h>

 int           findnext(ffblk);
 struct ffblk  *findnext;

    findnext() is used to fetch subsequent files that match the
    'pathname' specified in findfirst().  'ffblk' still contains all the
    necessary information about the file for continuing the search. One
    file name for each call to findnext() will be returned until no more
    matching files are found in the directory. The format of the
    structure 'ffblk' is as follows:

          struct ffblk  {
               char ff_reserved[21];         /* Reserved by DOS */
               char ff_attrib;                    /* Attribute found */
               int ff_ftime;                 /* File time */
               int ff_fdate;                 /* File date */
               long ff_fsize;                /* File size */
               char ff_name[13];             /* Found file name */
          };

       Returns:     0 is returned if a file matching 'pathname' is found.
                    On error, or if no more files are found, -1 is
                    returned and 'errno' (defined in <errno.h>) is set to
                    either ENOENT (Path or file name not found) or
                    ENMFILE   (No more files).


   Portability:     MS-DOS only.


See Also: findfirst()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson