unix has a which command to tell you the path of the executable file which is first found on the path and which will get executed when you type the command without an explicit path.
The simplest use can be aped really easily in the Windows command interpreter. Just create a batch file called which.cmd and bung it on the path, e.g. in C:\Windows (well, %SystemRoot% for purists):
@echo off
for %%i in (%1) do echo %%~$path:i
So now, from a command prompt, you can find which (if any) of those pesky command-line tools is going to run:
C:\>which xsd.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\xsd.exe
C:\>
Yay!
Advertisements