Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- 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.  If
                no more files can be found or on error, a -1 is returned
                and 'errno' (defined in <stdlib.h>) is set to either:

                        ENOENT          Path or file name not found
                        ENMFILE         No more files.

See Also: findfirst()

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