which
This tool locates executable files on the PATH. And it does a lot more. It can be used to determine which executable Windows will call, when multiple copies exist. Usage:
usage: which.py [options] options: -h, --help show this help message and exit -x EXTENSION search for EXTENSION -d DIRECTORY include DIRECTORY -r search directories recursive -e C-style string formatting in quotes -b break after the first result
To find notepad on the path, try:
c:> which notepad
To locate an include file, you can try the following:
c:> which windows.h -d "%INCLUDE%"
Note: You need quotes around %INCLUDE% because the environment variable is likely to include spaces.