windows WHERE/WHICH

May 20, 2014 10:44

While later versions of Windows have a where command, you can also do this with Windows XP by using the environment variable modifiers, as follows:

c:\> for %i in (cmd.exe) do @echo. %~$PATH:i
C:\WINDOWS\system32\cmd.exe

c:\> for %i in (python.exe) do @echo. %~$PATH:i
C:\Python25\python.exe

(http://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line)

reference

Previous post Next post
Up