I have a method that opens a saved settings file (when clicking file->open), which I am trying to get to open a file automatically when I open another set of files.
So to do this I want to count how many of a specific type of file I have in a single folder, to make sure that there is only 1. There will be other file types in the folder as well, so I need a way to get around them.
I already have the path to the folder, but is there an easy way to search for file types? Perhaps even get their names?
I'm pretty new to MFC, and being as old as it is, I can't find much help in the specific areas I want. Thanks!
edit (for clarification) - For example lets say I have a folder containing 3 word documents and a text file. I want it to be able to search the folder and say that there are 3 files with that are a .docx or 1 file that is a .txt (depending on what I tell it to search for). And it would be nice if I could save the name of one of the found files.