Say I have a program X.EXE
installed in folder c:\\abcd\\happy\\
on the system. The folder is on the system path. Now suppose there is another program
Use the where
command. The first result in the list is the one that will execute.
C:\> where notepad C:\Windows\System32\notepad.exe C:\Windows\notepad.exe
According to this blog post, where.exe
is included with Windows Server 2003 and later, so this should just work with Vista, Win 7, et al.
On Linux, the equivalent is the which command, e.g. which ssh
.