I often need to jump into a command-line interface (CLI) in Windows from an Explorer window. Previous, I used to type cmd . into Explorer’s current directory (press F4 to hightlight) to open the current directory. However, I have been using Windows Terminal (wt) more than the classic Command Prompt (cmd) for some of the quality of life features (e.g., tabs). To call Windows Terminal from Explorer type wt into the current directory – but this does not open the current directory. Neither does wt ., you’ll get an obscure error: [error 2147942405 (0x80070005) when launching .]. If you look at the help (wt --help), it is burried in the help. If you do wt new-tab --help will have the starting directory command.

wt -d .

This will open the current directory as the starting directory (-d, short for --startingDirectory) in Windows Terminal. Better than copying and pasting then manually changing directories. Nice!

Variations

Alternatively, one can drop a character and make it:

wt -d.

Or if your hand is already on the mouse, right click (i.e., the context menu) on the Explorer window and select “Open in Terminal”.

Open in Terminal - Context Menu