Advertisement
Guest User

which.cmd

a guest
Jul 20th, 2011
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.25 KB | None | 0 0
  1. setlocal
  2. if "%1" == "" goto noArg
  3.  
  4. set fullpath=%~$PATH:1
  5. if "%fullpath%" == "" goto notFound
  6. echo Found in PATH: %fullpath%
  7. goto end
  8.  
  9. :noArg
  10. echo No Argument specified
  11. goto end
  12.  
  13. :notFound
  14. echo Argument "%1" not found in PATH
  15.  
  16. :end
  17. endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement