can .exe find the path to a file?

This is a discussion on can .exe find the path to a file? within the Windows Programming forums, part of the Platform Specific Boards category; I want to check the path to a file on a bunch of computers. I was going to use a ...

I haven't been exposed to anything in c++ that would do that...so, my first thought is, create a dos batch file that uses the dos search commands for the file. Save the end result into a variable in your program and batta bing batta boom you have the path, then ofstream fout (whatever.txt); and that's about all i can think of for now.

Two functions that come to mind are FindExecutable(), and FindFirstFile(). There are non-windows specific ways but there is no need to use them. I find that FindExecutable() is fantastic for finding the path of the directory that your executible is running from. It sounds like you want to use FindFirstFile()/FindNextFile() functions to do what you want.