Is there an equivalent of 'which' on the Windows command line?

后端 未结 26 2026
悲哀的现实
悲哀的现实 2020-11-22 00:40

As I sometimes have path problems, where one of my own cmd scripts is hidden (shadowed) by another program (earlier on the path), I would like to be able to find the full pa

26条回答
  •  隐瞒了意图╮
    2020-11-22 00:52

    I have used the which module from npm for quite a while, and it works very well: https://www.npmjs.com/package/which It is a great multi platform alternative.

    Now I switched to the which that comes with Git. Just add to your path the /usr/bin path from Git, which is usually at C:\Program Files\Git\usr\bin\which.exe. The which binary will be at C:\Program Files\Git\usr\bin\which.exe. It is faster and also works as expected.

提交回复
热议问题