How can I get file's directory by just typing it's name. (C++) : Is there a way to globally search for a file name + .exe or whatever, and then get it's directory. That means, let's say i have a file called "food.txt" in my deep C drive. I want to get it's directory, no matter where i put it in my pc by just typing it's name.