Locate executables with where.exe on Windows
See every match for a command name across your PATH — the fastest answer to 'which python is actually running?'
01Command
$ where.exe python02What it does
where.exe walks the current directory then each PATH entry and prints all matches, first line = the one that will actually execute. In PowerShell `where` is an alias for Where-Object, so typing where.exe in full matters — a classic gotcha. It also does light file pattern searches (`where.exe /r C:\Projects *.sln`), but for PATH debugging the plain form is the one to remember; pair it with `$env:Path -split ';'` to see the raw search order.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- where | Microsoft LearnEvidence: Microsoft documents where.exe as displaying the location of files matching a search pattern, searching the current directory and PATH.
- WHERE - Windows CMDEvidence: SS64 explains where.exe searches PATH for executables and how it differs from PowerShell's Where-Object alias.
Last verified: 2026-09-17 · Category: Developer
06Related solutions
Use Windows Package Manager to install, search, and upgrade thousands of applications from the community repository in one command.
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
One pipeline that renames every matching file in a folder using regular expressions — safer and far more flexible than third-party renamers.