>> >> Hi All,
>> >> Does anyone know of a DOS or cmd.exe equivalent to the Linux 'which'
[quoted text clipped - 12 lines]
>
> Hmm,Well the link Provide both if you did read.
Yes indeed. A more direct answer is "set path". As it is documented, this
command displays the contents of the Path environment variable.
The program in question is somewhere in one of the folders in the Path.
Jim
Martin O - 12 Feb 2007 19:10 GMT
Thanks for the replies guys.
I checked that link nass. I couldnt find anything about an equivalent to the
linux 'which' command. There is another variation of this command on other
flavors of unix...I think its 'file' if I remember correctly. I found
mentions of a dos command 'truename' I think it was. But this is not in XP.
Thanks for pointing out that I can view the contents of the PATH variable
Jim. I suppose if I had to, I could check each folder in my path for the
executable I'm looking for, then I could assume that the OS is executing the
first one I found. I was actually hoping for something easy like the linux
'which' command though. For example, in linux, if I have different java
executables, I could quickly find out which one runs when I type just 'java'
by entering the command 'which java'. The result would be something like
'/usr/bin/java'. It would take into acount what my current directory is, and
the path, and give me *exactly which* java it would run. Useful for
sanity-checks.
At any rate, I've found a solution I should have thought of before: cygwin.
But I'd still be interested in finding out if theres an 'xp command line' way.
Thanks again.
> >> >> Hi All,
> >> >> Does anyone know of a DOS or cmd.exe equivalent to the Linux 'which'
[quoted text clipped - 16 lines]
> The program in question is somewhere in one of the folders in the Path.
> Jim