What is the cleanest way to recursively search for files using C ++ and MFC?
EDIT: Does any of these solutions allow you to use multiple filters in a single pass? I think with CFileFind I could filter on *. * And then write your own code for further filtering into different types of files. Does anything offer built-in multiple filters (e.g.. * .Exe, *. Dll)?
EDIT2: Just realized the obvious assumption that I am doing this makes my previous EDIT invalid. If I try to do a recursive search using CFileFind, I should use *. * As your template, because otherwise the subdirectories will not be mapped and recursion will not be performed. Thus, filtering on different file extensions will have to be processed separately independently.
source
share