Skip to content

Instantly share code, notes, and snippets.

@dominiccooney
Created October 16, 2009 04:54
Show Gist options
  • Save dominiccooney/211574 to your computer and use it in GitHub Desktop.
Save dominiccooney/211574 to your computer and use it in GitHub Desktop.
'which' for .bat files
REM Raymond Chen's replacement for Unix 'which'
@for %%e in (%PATHEXT%;.DLL) do @for %%i in (%1%%e) do @if NOT "%%~$PATH:i"==""
echo %%~$PATH:i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment