Click here to Skip to main content
15,895,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the full file path based on the file name in the C++ or MFC

Ex. i have file name txtone.txt based on this file name i need to get the fullpath
like if it is in D:\folder1\folder2\txtone.txt
Posted
Comments
Suvendu Shekhar Giri 26-Jun-15 3:29am    
Can not one multiple files with same name in different folders?
Do you want to do a complete system search to find out all the files with the name supplied? Is this your requirement?

1 solution

The best you can do is recursively search for such a file. Then you are going to deal with (possibly) multiple results. See for instance this Stack Overflow question: "Recursive file search using C++ MFC?"[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900