Powered by GeSHi

Source code for which.ps1

(view source code of which.ps1 as plain text)

  1. # Which.ps1,  Version 1.00
  2. # Locate the specified program file
  3. # Port of Unix' WHICH command
  4. #
  5. # Usage:  WHICH.PS1  filename[.ext]
  6. #
  7. # Where:  "filename" is a file name only: no drive or path
  8. #
  9. # Written by Rob van der Woude
  10. # http://www.robvanderwoude.com
  11.  
  12. param([string] $file=$(throw "Please specify a filename."))
  13. (get-command $file).Definition
  14.