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 be aware that I moderate all comments, so there will be a delay before your comment appears.

Advertising spam and the rare abusive, hateful or racist comments will be blocked and reported.

Finally, should you have a query about, or a bug report for, one of my programs or libraries please use the relevant issue tracker rather than posting a comment to report it.

Thanks

Popular posts from this blog

Initialising dynamic arrays

Deleting elements from a dynamic array

New Array Utilities Library Unit released