Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List files in a directory

Status
Not open for further replies.

EvilCabal

Programmer
Jul 11, 2002
206
CA
Hello,

How do I list all files in a specified directory. Can I use filters to get, let's say, only .txt files?

Thanks a lot!

Fred
 
Do you want it in a dialog or just as internal list for processing. If you want an internal list for processing, you need to set up

If you want a file dialog use CFileDialog (MFC). Set the filter to .txt. There is an equivalent in SDK but I can't remember what it is called.

For internal lists, look up findfirst and findnext or something very similar sounding on MSDN

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top