Code: Select all
set name=where
%WINDIR%\System32\where.exe %name%
Or "simply":
Code: Select all
set name=where
for %X in (%PATHEXT%) do @for %F in (%name%%X) do @if exist %~dp$PATH:F\%F echo %~dp$PATH:F\%F
Code: Select all
set name=where
%WINDIR%\System32\where.exe %name%
Code: Select all
set name=where
for %X in (%PATHEXT%) do @for %F in (%name%%X) do @if exist %~dp$PATH:F\%F echo %~dp$PATH:F\%F