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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I find a file and return the path in C++

Status
Not open for further replies.

psnead

Programmer
Jul 5, 2000
41
DK
Does anyone know how I can search directories until I find the file I am looking for and then return that file's path in C++?  I looked in direct.h but didn't find anything.
 
Dear psnead,<br><br>If your working in Win32 look at the API's FindFirstFile() etc. If your woring with MFC check out the class CFileFind.<br><br>Good luck<br>-pete
 
Does any one know how to do this in the console? ie NO windows support. Is it possible? Thanks
 
yes, #include<windows.h> and go on with FindFirstFile/FindNextFile John Fill
1c.bmp


ivfmd@mail.md
 
With CFileFind you can do it. If you want the code i used to traverse directories post your email

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top