How can I open a cmd window in a specific location without having to navigate all the way to the directory I want?
Join them; it only takes a minute:
|
You may want to look at this "PowerToy" from Microsoft:
|
|||||||||||||||||
|
|
This might be what you want:
Note that in order to change drive letters, you need to use
|
|||||||||||||||||||||
|
|
If you have Windows Vista or later, right-click on the directory icon in Explorer while holding the Shift key, and then click on the "Open command window here" context menu option. If you're already in the directory you want, you can:
For Windows XP, use the PowerToy mentioned by dF to get the same function. |
|||||||||||||||||||||
|
|
Assuming that in File Explorer you have opened the target directory/folder, do this:
You will notice that command prompt from that folder |
|||||||||||||||||||||
|
|
From Windows7 onwards , it is very simple to open command prompt anywhere you wish , without navigation using command "cd" . Try the following one. Click the mouse's right button by holding Shift key .
It will produce an option like this.Then simply select the "Open command window here " option. |
|||||||||
|
|
Use the /K switch. For example cmd /K "cd /d c:\WINDOWS\" Will create a cmd window at the C:\Windows directory |
|||||
|
|
Simple way in windows 10
|
|||||||||
|
|
On Windows Vista and Windows 7, simply hold down the Shift key and right-click on a folder. The context menu will contain an entry titled: "Open command window here" |
||||
|
|
|
Create a shortcut and edit the "Start In" property of the shortcut to the directory you want the cmd.exe to start in. |
|||
|
|
|
Update: This is built into Windows now. See this answer. The XP powertoy is a good option, but I thought I'd post another, in case you'd like to "roll your own". Create a text file, name it anything.reg, paste in the code below, save it, then double-click on it to add it to the registry (or just add the info to the registry manually if you understand what's going on in this .reg file).
|
||||
|
|
|
I just saw this question and cannot help to post my AutoHotkey script for cmd on Windows XP. You can spot the hot keys in the script. The nice thing is when your current windows is Explorer, the cmd will open in the path showing in the address bar. I keep this script in a folder where I store all green tools (including AutoHotkey). For a new machine, I just copy the folder, double click the script to associate .ahk with AutoHotkey and create a shortcut in my startup folder. It is faster than installing PowerToys.
For anyone who is interested, you can find this script at rwin on github |
|||||||||||||
|
|
In Windows 8, you can click the address bar and type "cmd" (without quotes) and hit enter. This will open the cmd window in the current path. |
|||||||||
|
|
Also, here is a shortcut to open a console in any windows folder:
Very practical shortcut. |
|||||
|
|
For windows 7 or later, inside the target folder address bar just type cmd. That is it. It will open up command prompt with path set to your present directory. |
|||||
|
|
Just write |
|||
|
|
|
Easiest way is to goto the address bar of the Windows Explorer and type |
|||||||||||||
|
|
I see that there are multiple answers, some are quite complex :) , strange to see them. You just have to open any windows folder window, navigate to your desired folder and focus on address bar and enter "cmd" and press enter, you would be presented with new command prompt window directly with the folder path or location that we already navigated in windows folder window. In case you want to see these steps with clear images you can check out |
|||
|
|
|
This program always opens cmd.exe in the current path of your Explorer: https://github.com/jhasse/smart_cmd You can also pin it to your taskbar and then use WindowsKey+[1-0] as a keyboard shortcut. |
||||
|
|
|
In File Explorer, press and hold the |
|||
|
|
|
There is a simplier way I know. Find cmd.exe in start menu and send it to Desktop as shortcut. Then right-click it and choose properties. You will see "Start in" box under the "Target". Change that directory as whatever you'd like to set. Click OK and start cmd.exe which is in your Desktop. In my opinion, it's a very easy and certain solution :) |
||||
|
|
|
In Windows Explorer - shift + right mouse click above folder "Open command window here" option show up in the menu. Or in language of your Windows version. |
|||
|
|
|
With a Just-one-line file in batch: START "Desire_Path" // Without quotes puth the location that you want to start in with cmd Example (Open a text editor, place the code in there and save the file with a .bat extension):
Then just double click on it ****Note: if you want the explorer to complete the task don´t put the CD command. *To do the opossite: In order for you to open a particular directory with the explorer.exe aplication while using cmd you can use the command START and the absolute route of the folder that you want to display. |
||||
|
|
|
This method is using
This shortcut should open a This method should work under Window 7 and 10 at least. Name the shortcut as Possible error messages:
Little about shortcut: The directory would be automatically added to the end of the shortcut as a parameter when using under |
|||
|
|
|
You can also do this:
|
||||
|
|
|
Right click the desktop and navigate to new and then from the sub-menu select "shortcut" → Browse to the Windows directory (or folder) and then to the Add a
Click Next and Finish. Right click the new CMD icon on your desktop and select properties, and Next to the Start. In options, delete the line and add the path to wherever the directory is that you want it to start in... For example, |
||||
|
|
|
Navigate to the folder which you want to open in command prompt - Keeping the 'Shift key' pressed. Right click there and choose option "open command window here" |
|||
|
|
|
Make the shortcut to cmd.exe with params /S /K pushd "C:\YOUR FOLDER\" |
|||
|
|
|
If you use Total Commander there is a field in the bottom for this. It shows the active directory you are currently in and will run the entered command in that directory.
|
|||
|
|
|
For a better experience using a terminal in windows system, cmder may help for a shortcut usage:
For an instance:
|
|||
|
|
|
In windows 10, you just need one click to get cmd in any folder.
Just hold |
|||
|
|
protected by JJJ Jan 10 at 21:43
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

