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

后端 未结 26 2121
悲哀的现实
悲哀的现实 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:55

    If you have PowerShell installed (which I recommend), you can use the following command as a rough equivalent (substitute programName for your executable's name):

    ($Env:Path).Split(";") | Get-ChildItem -filter programName*
    

    More is here: My Manwich! PowerShell Which

提交回复
热议问题