Opening a command line terminal from Windows Explorer

I'm sure that I'm not the only one who gets irritated when opening a terminal window from the Windows start menu that the first thing I have to do is cd out of my user directory into wherever I want to be.

On my old Win 7 machine I had an Explorer extension that let me open a command line in the selected directory. I don't have that on my current Win 10 machine. Neither do I want to do some registry editing nonsense to enable it.

So imagine the joy when I discovered this hack yesterday:

  1. In Windows Explorer select the folder where you want to open a command line terminal window. Select the folder in the left hand pane.

  2. Type cmd in the address bar.

  3. Press enter, and voila!

Wow ... wish I'd known that a few years ago.

Now, if I'm the only one in the world who doesn't know this already apologies for wasting your time!

And yes, I'm still using cmd.exe, and no, I don't use PowerShell. And yes, I'm an old fart resisting change. But I've checked and it works for PowerShell too:

Which is nice.

Comments

Anonymous said…
cd /d D:\Dev\Electronics
Jürgen Krämer said…
doskey cd=cd /d $*

cd D:\Dev\Electronics
Delphidabbler said…
Thanks both. I'll be using that.

You learn summat new every day!
EMB said…
Shift+RightClick
Works in any folder, in any place.
Delphidabbler said…
Thx, but while Shift-RightClick used to work on my previous Windows install, on my current Win 10 20H2 it doesn't! Judging by various posts on Stack Exchange etc, others have the same prob :(
vhanla said…
As a keyboard user (mostly), I would select any folder then press Alt+D or Ctrl+L, type any command there, like cmd or cmd /c , or wt -d . to start windows terminal, or git clone <...>. Another way was to use quick access toolbar (Alt+) customized, when it had CMD instead of PowerShell, now in Windows 11, it is gone Ribbon's quick access toolbar.
Delphidabbler said…
Thx vhanla

I'll try some of those keyboard shortcuts & see if I can remember them!
Gerry said…
If you install Windows Terminal, you get an "Open in Windows Terminal" option.
You can set Windows Terminal to use cmd as the default
Delphidabbler said…
Ta Gerry.

I'll investigate that

Popular posts from this blog

New Unit2NS Application Released in Beta

Embarcadero Announce RAD Studio 11 Is Coming

Some Features of the Upcoming Delphi 11 (probably)