•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 427,847 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,759 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 11740 | Replies: 2
![]() |
•
•
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation:
Rep Power: 11
Solved Threads: 102
•
•
Join Date: Dec 2004
Posts: 13
Reputation:
Rep Power: 0
Solved Threads: 1
Heres a snippet in mfc for finding a file of form *.extension in directory = myDirectory
// Get a list of files
CFileFind finder;
BOOL finding = finder.FindFile (myDirectory + CString ("\\*.") + extension);
//iterate the results
while (finding)
{
finding = finder.FindNextFile();
//get file path
CString path = finder.GetFilePath());
//get file title
CString title = finder.GetFileTitle()
}
//dont forget to close
finder.Close ();![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- save file names into char array (C)
- C++ How can read from file.txt & where can save this file(file.txt) to start reading (C++)
- create, write & read file to/from folder (C++)
- Reading file names from a folder (PHP)
- How to get Directory and File names (C++)
- Turn Off File Names in Thumbnail View (Windows tips 'n' tweaks)
Other Threads in the C++ Forum
- Previous Thread: Can't figure out this seg fault
- Next Thread: series of 1 + 1/2 + 1/3 ...etc



Linear Mode