Which for Windows

GnuWin32 · GnuWin32.Which

Which: show the full path of (shell) commands

Which takes one or more arguments. For each of its arguments it prints to stdout the full path of the executables that would have been executed when this argument had been entered at the shell prompt. It does this by searching for an executable or script in the directories listed in the environment variable PATH using the same algorithm as bash. The GnuWin32 port of Which searches for a matching file in the following sequence of directories: - The current directory. - The directories that are listed in the PATH environment variable. If the filename given on the command line cannot be found in any of the above directories, the search is repeated with the extensions given in the environment variable PATHEXT until a match occurs. If PATHEXT is empty or does not exist, a value of ".com;.exe;.bat;.cmd" is assumed.

winget install --id GnuWin32.Which --exact --source winget

Latest 2.20

Installer type: zip

Architecture Scope Download SHA256
x86 — Download 035EC15541649F75459FB81F02406C72E1129FC9041B308160938AE712A603A4

Details

Homepage
https://gnuwin32.sourceforge.net/packages/which.htm
License
GnuWin License
Publisher
GnuWin32
Support
https://gnuwin32.sourceforge.net/lists.html
Copyright
Copyright (C) 1999 - 2008 Carlo Wood.
Moniker
which