TIL executing commands in file explorer
Introduction
Today I learned that executing commands in the Windows file explorer address bar works!
I discovered this by accident when my focus was in the wrong window. I used ⊞ win + E (file explorer) when I really meant ⊞ win + R (run command). A happy little accident.
How does it work?
- Start explorer.exe
- Go to the address bar (protip: Alt + D or Ctrl + L)
- Enter
cmd
This starts a command window with the current directory as working directory. Ain’t that nice?
Illustrated guide
Step 1 - open file explorer
Step 2 - enter a command
This happens to work with all kind of commands. Try dotnet run
, php -S localhost: 8080
, npm start
or python3 -m http.server
depending on your favorite platform.
The other way around
If you are in a command shell, enter:
start .
and it will open explorer.exe within the current directory.