Return to Snippet

Revision: 13300
at April 21, 2009 13:04 by maphew


Updated Code
@echo off
for %%f in (foobar.exe) do (
   if exist "%%~dp$PATH:f" echo %%f located at "%%~dp$PATH:f"
   )

Revision: 13299
at April 17, 2009 19:51 by maphew


Initial Code
for %%f in (foobar.exe) do (
   if exist "%%~dp$PATH:f" echo %%f located at "%%~dp$PATH:f"
   )

Initial URL
http://www.ss64.com/nt/syntax-args.html

Initial Description
I'm always forgetting the syntax for this, and finding it is hard because the key words apply to so many different uses that aren't this one

Initial Title
look for given .exe in PATH

Initial Tags

                                

Initial Language
DOS Batch