Wildcards for opening files.

Can you use the CFile open routine for opening all files of a certain type (i.e. *.MWL) in a directory? Can somehow tell me how to do this or point me in the right direction?
HVDCAsked:
Who is Participating?
 
Shay050799Connect With a Mentor Commented:
you can do this

CFile* pFile;
CFileFind find;
find.FindFile("\\*.MWL")
while(find.FindNExtFile())
{
if(pFile=new CFile(find.GetFilePath(),CFile;;moreRead))
{
.... file operation...
}
pFile->Close();
delete pFile;
}
0
 
Shay050799Commented:
how can u point with one file handle to multyply files ???
that doesn't make any sense !!!
0
 
HVDCAuthor Commented:
I understand that. Just wondering if there is a function out there to open files using wildcards.
0
All Courses

From novice to tech pro — start learning today.