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

  1. Anonymous11:43 am

    cd /d D:\Dev\Electronics

    ReplyDelete
  2. Jürgen Krämer12:12 pm

    doskey cd=cd /d $*

    cd D:\Dev\Electronics

    ReplyDelete
  3. Thanks both. I'll be using that.

    You learn summat new every day!

    ReplyDelete
  4. Shift+RightClick
    Works in any folder, in any place.

    ReplyDelete
  5. 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 :(

    ReplyDelete
  6. 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.

    ReplyDelete
  7. Thx vhanla

    I'll try some of those keyboard shortcuts & see if I can remember them!

    ReplyDelete
  8. Gerry1:25 am

    If you install Windows Terminal, you get an "Open in Windows Terminal" option.
    You can set Windows Terminal to use cmd as the default

    ReplyDelete
  9. Ta Gerry.

    I'll investigate that

    ReplyDelete

Post a Comment

Comments are very welcome, but please don't comment here if:

1) You have a query about, or a bug report for, one of my programs or libraries. Most of my posts contain a link to the relevant repository where there will be an issue tracker you can use.

2) You have a query about any 3rd party programs I feature, please address them to the program's developer(s) - there will be a link in the post.

3) You're one of the tiny, tiny minority who are aggressive or abusive - in the bin you go!

Thanks

Popular posts from this blog

Focus On: Deleaker - a Delphi, C++ & C# Memory Leak Detector

Some Features of the Upcoming Delphi 11 (probably)

Swap two integers without using a temporary variable