Open relative Command Prompt or Explorer windows quickly

Martin Brinkmann
Oct 23, 2016
Windows
|
19

When it comes to opening command prompt windows or Windows Explorer / File Explorer windows, there is often a way to accomplish this faster.

How would you for instance open a command prompt window that uses the same path as the open Explorer window quickly?

Would you select File > Open command prompt > Open Command Prompt in File Explorer? Hold down the Shift-key while you right-click on the folder you want as the starting folder of a command prompt window? Use a third-party program that adds an option to the shell directly? Open Command Prompt manually and navigate to the folder manually as well?

All of those methods work, but they are not necessarily super fast. Now, how about typing cmd in the address bar of the Explorer window and hitting the Enter-key afterwards? Boom, a command prompt window opens with the current Explorer path as its starting path.

explorer open command prompt

This may be considerably faster than any of the options that you have used up until now. The only caveat is that you cannot launch a command prompt window with elevated rights using the method; at least none that I'm aware of.

The "hold down Shift and Ctrl" trick to run programs with elevated rights does not work unfortunately.

Now, what if you wanted to perform the operation the other way around? You are using the command prompt and want to launch an Explorer window that displays the contents of the active folder?

There are several options to do that. Either type "start ." to do so, or use "explorer .\". Both methods work and will open an Explorer window that displays the contents of the active command prompt folder.

And if you prefer Powershell or use it regularly, you can do the same using the command "ii .".

All three have in common that they spawn an Explorer window that displays the contents of the active location.

open explorer from command prompt

You can spawn an Explorer window that lists the contents of the default location as well using "explorer" without any parameters, but it may be faster to simply click on the Explorer icon in the taskbar if it is pinned to it, or use the shortcut Windows-E to open an Explorer window instead. (via Reddit)

Now You: How do you perform these tasks? Have any other methods of doing them?

Summary
Open relative Command Prompt or Explorer windows quickly
Article Name
Open relative Command Prompt or Explorer windows quickly
Description
Find out how to open relative command prompt windows or Windows Explorer / File Explorer windows quickly using simply shortcuts.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Brent Jones said on October 26, 2016 at 5:09 pm
    Reply

    thank you Martin for the tips

  2. Alessandro Tristan said on October 26, 2016 at 8:21 am
    Reply

    Thanks. I didn’t know they exists… :)

  3. Anonymous said on October 24, 2016 at 3:08 pm
    Reply

    Thenks!!! Best tips I’ve seen in a few years!!!
    I always wonder if there is any more hidden shortcuts like these still unknown for me..

  4. didihu said on October 24, 2016 at 12:33 pm
    Reply

    subgenius..it doesn’t work on windows10 ! or i don’t understand (i’m french)

    1. SubgeniusD said on October 25, 2016 at 3:11 am
      Reply

      Sorry – I’m still on Win 7 Pro (and Linux).

      Win 10 is actually a bit simpler: http://lookpic.com/O/i2/1445/ZT73HmA9.png

  5. Victor said on October 24, 2016 at 9:24 am
    Reply

    What about File-> Cmd or Powershell submenus , right click on the ones you want to pin it to quick access. Then just press Alt+ the number assigned to it.

    http://imgur.com/a/parF1

  6. SubgeniusD said on October 24, 2016 at 2:49 am
    Reply

    Why not just pin to taskbar? Opens in a split second.
    Start menu->All Programs->Accessories->Command Prompt
    R-click select “Pin to Taskbar”
    From taskbar
    R-click select Properties.
    Properties screen->Shortcut tab->Advanced button
    Advanced Properties screen check “Run as Administrator”

  7. RossN said on October 23, 2016 at 10:54 pm
    Reply

    I use Q-DIR. Click on ‘lightning bolt’. Click on CMD.

    Just checked using the following batch file, and it doesn’t get me elevated permissions.
    @echo off
    goto check_Permissions
    :check_Permissions
    echo Administrative permissions required. Detecting permissions…
    net session >nul 2>&1
    if %errorLevel% == 0 (
    echo Success: Administrative permissions confirmed.
    ) else (
    echo Failure: Current permissions inadequate.
    )
    pause >nul

  8. Zinc Whiskers said on October 23, 2016 at 10:40 pm
    Reply

    Just click on “File”…then select “Open Command Prompt”

    1. mc said on November 16, 2016 at 2:31 am
      Reply

      this.

  9. pHROZEN gHOST said on October 23, 2016 at 7:31 pm
    Reply

    I like the initial one using the explorer. But, I added both normal and elevated to the quick access toolbar.

    1. Donkeyfumbler said on October 24, 2016 at 1:35 pm
      Reply

      Nice – thanks for the tip.

  10. pd said on October 23, 2016 at 6:36 pm
    Reply

    That’s a nifty power user trick. Thanks.

  11. Pete said on October 23, 2016 at 4:49 pm
    Reply

    Best method, import this into registry (adds context menu item for cmd prompt (for desktop and explorer drive & directory context menus)):

    Windows Registry Editor Version 5.00

    [-HKEY_CLASSES_ROOT\Directory\shell\runas]

    [HKEY_CLASSES_ROOT\Directory\shell\runas]
    @=”CMD Prompt”
    “Icon”=”cmd.exe”

    [HKEY_CLASSES_ROOT\Directory\shell\runas\command]
    @=”cmd.exe /s /k pushd \”%V\””

    [-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]

    [HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
    @=”CMD Prompt”
    “Icon”=”cmd.exe”

    [HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
    @=”cmd.exe /s /k pushd \”%V\””

    [-HKEY_CLASSES_ROOT\Drive\shell\runas]

    [HKEY_CLASSES_ROOT\Drive\shell\runas]
    @=”CMD Prompt”
    “Icon”=”cmd.exe”

    [HKEY_CLASSES_ROOT\Drive\shell\runas\command]
    @=”cmd.exe /s /k pushd \”%V\””

    1. Delt said on October 23, 2016 at 11:26 pm
      Reply

      How is this different than using Shift-right click?

  12. peter said on October 23, 2016 at 4:26 pm
    Reply

    Neat trick, thanks!

  13. Robert G. said on October 23, 2016 at 2:36 pm
    Reply

    Try Open Command Prompt Shell Extension 2.1.0.1 (x86x64):

    http://code.kliu.org/cmdopen/

    or

    http://www.softpedia.com/get/System/OS-Enhancements/Open-Command-Prompt-Shell-Extension.shtml

    Tested with Win10 Pro 64-bit.

  14. Nik said on October 23, 2016 at 2:20 pm
    Reply

    Did you disable comments in mobile theme? Not able to view comments on my phone.

    1. RichardT said on October 23, 2016 at 10:50 pm
      Reply

      I also don’t see comments when viewing ghacks on my phone.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.