which for Windows


Which is now part of Yori. Information on this page may be stale.

Which for Windows is a re-implementation of the UNIX/Linux which command for Windows. By default it searches %PATH% and applies executable extensions, but can be told to seach any environment variable containing a path list for any specific file.


This software is licensed under the terms of the MIT license.


Latest stable precompiled binary (with MiniCRT)
which.exe (version 1.20, 11.5 Kb, last updated 16 Jul 2017)
Latest stable source code
which-source.zip (version 1.20, 10.6 Kb, last updated 16 Jul 2017)
Latest development precompiled binary (with MiniCRT)
which.exe (version 1.12.2016102301, 11 Kb, last updated 24 Oct 2016)
Latest development source code
which-source.zip (version 1.12.2016102301, 10 Kb, last updated 24 Oct 2016)
Older versions
See the archive page.

System Requirements

To run which binaries, you need Windows NT 3.1 or newer. Note that Windows 95/98/Me are not supported by these binaries.

To compile from source, you need Visual C++, version 2 or newer, and you need to compile with MiniCRT. Free versions of Visual C++ are included in the Visual C++ 2015 Build Tools, Windows SDK 7.1 (2010), or Windows SDK 7.0 (2008).

Build instructions

  1. Open a command prompt to your version of Visual C++ and set up your environment.
  2. Unpack and enter the which source tree.
  3. Unpack the minicrt source tree within the which source tree in a directory called "crt".
  4. Most of the time, just run "nmake".

Compilation options

Compilation options can be used by passing arguments to NMAKE.

DEBUG=Enable debug code. Valid values are 0 (disabled) or 1 (enabled.) Default is 0.
UNICODE=Compile a Unicode or ANSI version of the binary. Unicode is more useful on NT, but ANSI is required to run on Windows 95. Valid values are 1 (Unicode) or 0 (ANSI.) Default is 1.