How to test if an executable exists in the %PATH% from a windows batch file?

后端 未结 9 617
暖寄归人
暖寄归人 2020-12-22 20:33

I\'m looking for a simple way to test if an executable exists in the PATH environment variable from a Windows batch file.

Usage of external tools not provided by th

9条回答
  •  遥遥无期
    2020-12-22 21:16

    Use command : powershell Test-Path "exe which you looking for"

    It will return True if its present, otherwise False.

提交回复
热议问题