Open relative Command Prompt or Explorer windows quickly
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.
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.
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?
thank you Martin for the tips
Thanks. I didn’t know they exists… :)
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..
subgenius..it doesn’t work on windows10 ! or i don’t understand (i’m french)
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
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
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”
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
Just click on “File”…then select “Open Command Prompt”
this.
I like the initial one using the explorer. But, I added both normal and elevated to the quick access toolbar.
Nice – thanks for the tip.
That’s a nifty power user trick. Thanks.
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\””
How is this different than using Shift-right click?
Neat trick, thanks!
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.
Did you disable comments in mobile theme? Not able to view comments on my phone.
I also don’t see comments when viewing ghacks on my phone.