File Searching with _findfirst and _findnext

This is a discussion on File Searching with _findfirst and _findnext within the C Programming forums, part of the General Programming Boards category; I have looked at other posts based on this topic but my question was not answered. I am searching for ...

  1. #1
    l WolfPac l
    Guest

    File Searching with _findfirst and _findnext

    I have looked at other posts based on this topic but my question was not answered. I am searching for a file that is specified by the command-line. I have the DevC++ compiler and I have roughly all the logic good to go but I still have one question. I noticed that with some of the other questions regarding this topin involved the ffblk structure while in DevC++ there is no ffblk struct as dir.h is considered obsolete by their standards and created the io.h header file instead. The two functions, _findfirst and _findnext are different as _findfirst returns a handle that will be used by _findnext. My problem is that I do not know how to get the two to work off of each other.

    /*
    * Functions for searching for files. _findfirst returns -1 if no match
    * is found. Otherwise it returns a handle to be used in _findnext and
    * _findclose calls. _findnext also returns -1 if no match could be found,
    * and 0 if a match was found. Call _findclose when you are finished.
    */
    int _findfirst (const char* szFilespec, struct _finddata_t* find);
    int _findnext (int nHandle, struct _finddata_t* find);
    int _findclose (int nHandle);

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    29
    Nevermind. I figured it out.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21