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

后端 未结 26 2717
悲哀的现实
悲哀的现实 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 01:05

    try this

    set a=%~$dir:1
    If "%for%"=="" (Echo %1 not found) else (echo %1 found at %a%)
    

提交回复
热议问题