None of the code included in my above postings is part of MFC. MFC has a class that wraps this functionality in a class called CFileFind which is much simpler to use and you don't have to worry about using things such as the WIN32_FIND_DATA type or handles to the findfile functions.