<p>How can I open a cmd window in a specific location without having to navigate all the way to the directory I want?</p>

[{'answer_id': 60905, 'author': 'dF.', 'author_id': 3002, 'author_profile': 'https://Stackoverflow.com/users/3002', 'pm_score': 7, 'selected': True, 'text': '<p>Try out <a href="http://go.microsoft.com/fwlink/?LinkId=211471" rel="nofollow noreferrer">this "PowerToy" from Microsoft</a>:</p>\n\n<blockquote>\n  <p><strong>Open Command Window Here</strong></p>\n  \n  <p>This PowerToy adds an "Open Command\n  Window Here" context menu option on\n  file system folders, giving you a\n  quick way to open a command window\n  (cmd.exe) pointing at the selected\n  folder.</p>\n</blockquote>\n\n<p><strong>EDIT :</strong> This software will not work on any version of Windows apart from Windows XP.</p>\n\n<p><a href="https://i.stack.imgur.com/sdXWW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sdXWW.png" alt="enter image description here"></a></p>\n'}, {'answer_id': 60907, 'author': 'Allain Lalonde', 'author_id': 2443, 'author_profile': 'https://Stackoverflow.com/users/2443', 'pm_score': 9, 'selected': False, 'text': '<p>This might be what you want: </p>\n\n<pre><code>cmd /K "cd C:\\Windows\\"\n</code></pre>\n\n<p>Note that in order to change drive letters, you need to use <code>cd /d</code>. For example:</p>\n\n<pre><code>C:\\Windows\\System32\\cmd.exe /K "cd /d H:\\Python\\"\n</code></pre>\n\n<p><a href="http://ss64.com/nt/cd.html" rel="noreferrer">(documentation)</a></p>\n'}, {'answer_id': 60911, 'author': 'Jason Punyon', 'author_id': 6212, 'author_profile': 'https://Stackoverflow.com/users/6212', 'pm_score': 5, 'selected': False, 'text': '<p>Use the /K switch.  For example</p>\n\n<pre>\ncmd /K "cd /d c:\\WINDOWS\\"\n</pre>\n\n<p>Will create a cmd window at the C:\\Windows directory</p>\n'}, {'answer_id': 60913, 'author': 'simon', 'author_id': 6040, 'author_profile': 'https://Stackoverflow.com/users/6040', 'pm_score': 4, 'selected': False, 'text': '<p>Create a shortcut and edit the "Start In" property of the shortcut to the directory you want the cmd.exe to start in.</p>\n'}, {'answer_id': 60914, 'author': 'Michael Ratanapintha', 'author_id': 1879, 'author_profile': 'https://Stackoverflow.com/users/1879', 'pm_score': 8, 'selected': False, 'text': '<p>If you have Windows Vista or later, right-click on the folder icon in Explorer while holding the Shift key, and then click on the "Open command window here" or "Open PowerShell window here" context menu option. </p>\n\n<p>If you\'re already in the folder you want, you can do one of the following:</p>\n\n<ul>\n<li>[only Win8+] Click the Explorer Ribbon\'s File button, then click on "Open command window here" or "Open PowerShell window here".</li>\n<li><kbd>Shift</kbd>-<kbd>right-click</kbd> on the background of the Explorer window, then click on "Open command window here" or "Open PowerShell window here". (recommended by Kate in the comments)</li>\n<li>[only Vista or Win7] Hold down Shift when opening the Explorer File menu, then click on "Open command window here". If you can\'t see the menu bar, open the File menu by pressing <kbd>Alt</kbd>-<kbd>Shift</kbd>-<kbd>F</kbd> - <kbd>Alt</kbd>-<kbd>F</kbd> to open the File menu, plus <kbd>Shift</kbd>.</li>\n</ul>\n\n<p>For Windows XP, <a href="https://stackoverflow.com/a/60905/1879">use the PowerToy mentioned by dF</a> to get the same function.</p>\n'}, {'answer_id': 215534, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>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 <code>system32</code> directory and click <kbd>OK</kbd>.</p>\n\n<p>Add a <code>\\</code> and "cmd.exe" (without the quotes) to the command string. It should look like this:</p>\n\n<pre><code>C:\\WINDOWS\\System32\\cmd.exe.\n</code></pre>\n\n<p>Click <kbd>Next</kbd> and <kbd>Finish</kbd>. Right click the new CMD icon on your desktop and select properties, and <kbd>Next</kbd> 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, <code>C:\\temp\\mp3</code> and click <kbd>OK</kbd>.</p>\n'}, {'answer_id': 215558, 'author': 'raven', 'author_id': 4228, 'author_profile': 'https://Stackoverflow.com/users/4228', 'pm_score': 3, 'selected': False, 'text': '<p><strong>Update</strong>:  This is built into Windows now.  See <a href="https://stackoverflow.com/a/60914/4228">this answer</a>.</p>\n\n<p>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).</p>\n\n<pre><code>Windows Registry Editor Version 5.00\n\n[HKEY_CLASSES_ROOT\\Folder\\shell\\Command_Prompt_Here...]\n@="Command Prompt Here..."\n\n[HKEY_CLASSES_ROOT\\Folder\\shell\\Command_Prompt_Here...\\command]\n@="cmd.exe \\"%1\\""\n</code></pre>\n\n<p>Update: After an Windows-update, <strong>Win10</strong> removed the cmd-here feature. To reactivate it you\'ve to use:</p>\n\n<pre><code>Windows Registry Editor Version 5.00\n\n[HKEY_CLASSES_ROOT\\Directory\\shell\\cmd]\n@="@shell32.dll,-8506"\n"Extended"=""\n"NoWorkingDirectory"=""\n"ShowBasedOnVelocityId"=dword:00639bc8\n\n[HKEY_CLASSES_ROOT\\Directory\\shell\\cmd\\command]\n@="cmd.exe /s /k pushd \\"%V\\""\n</code></pre>\n\n<p>The entry <code>ShowBasedOnVelocityId</code> is mandatory</p>\n'}, {'answer_id': 1220972, 'author': 'crowdy', 'author_id': 123706, 'author_profile': 'https://Stackoverflow.com/users/123706', 'pm_score': 2, 'selected': False, 'text': '<p>You can also do this:</p>\n\n<pre><code>[HKEY_CLASSES_ROOT\\Directory\\shell\\cmd]\n@="command prompt here"\n[HKEY_CLASSES_ROOT\\Directory\\shell\\cmd\\command]\n@="cmd.exe /c start \\"%1\\" cmd.exe /k cd /d %1"\n[HKEY_CLASSES_ROOT\\Drive\\shell\\cmd]\n@="command prompt here"\n[HKEY_CLASSES_ROOT\\Drive\\shell\\cmd\\command]\n@="cmd.exe /c start \\"%1\\" cmd.exe /k cd /d %1"\n</code></pre>\n\n<p>Update: for Win10 you need <code>ShowBasedOnVelocityId</code> - see answer above.</p>\n'}, {'answer_id': 5342262, 'author': 'Codism', 'author_id': 155253, 'author_profile': 'https://Stackoverflow.com/users/155253', 'pm_score': 4, 'selected': False, 'text': '<p>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.</p>\n\n<p>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 <a href="https://en.wikipedia.org/wiki/Microsoft_PowerToys" rel="nofollow noreferrer">PowerToys</a>.</p>\n\n<pre><code>; Get working folder\nGetWorkingFolder() {\n    if WinActive("ahk_class ExploreWClass") or WinActive("ahk_class CabinetWClass") {\n        ControlGetText, path, Edit1\n        return %path%\n    } else if WinActive("FreeCommander") {\n        Send, {CTRLDOWN}{ALTDOWN}{INS}{ALTUP}{CTRLUP}\n        Sleep, 100\n        return clipboard\n    } else {\n        return "C:\\"\n    }\n}\n\n#IfWinActive,\n\n#c::\n    path := GetWorkingFolder()\n    Run, %ComSpec%, %path%\n    return\n\n; PowerShell\n#+C::\n    path := GetWorkingFolder()\n    Run, %SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe, %path%\n    return\n\n#^c::\n    Run, %ComSpec%, %temp%\n    return\n\n#!c::\n    path := GetWorkingFolder()\n    Run, %comspec% /k "%VS90COMNTOOLS%vsvars32.bat", %path%\n    return\n\n; irb\n#!b::\n    path := GetWorkingFolder()\n    Run, c:\\cygwin\\bin\\ruby /usr/bin/irb, %path%\n    return\n\n; Bash\n#b::\n    path := GetWorkingFolder()\n    Run, bash --login, %path%\n    return\n\n; Paste in console\n+INS::\n    if WinActive("ahk_class ConsoleWindowClass") {\n        WinGetPos, x, y, w, h, A\n        MouseGetPos, mx, my\n        ;MsgBox x=%x% y=%y% w=%w% h=%h% mx=%mx% my=%my%\n        if (mx &lt; 10)\n            mx = 10\n        else if (mx &gt; w - 30)\n            mx := w - 30\n\n        if (my &lt; 40)\n            my = 40\n        else if (my &gt; h)\n            my := h - 10\n\n        MouseClick, right, mx, my\n    }\n    return\n</code></pre>\n\n<p>For anyone who is interested, you can find this script at <a href="https://github.com/codism15/rwin/blob/master/ahk-scripts/console.ahk" rel="nofollow noreferrer">rwin on github</a></p>\n'}, {'answer_id': 7977773, 'author': 'destroyer313', 'author_id': 1025270, 'author_profile': 'https://Stackoverflow.com/users/1025270', 'pm_score': 2, 'selected': False, 'text': '<p>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 :)</p>\n'}, {'answer_id': 8878113, 'author': 'jhasse', 'author_id': 647898, 'author_profile': 'https://Stackoverflow.com/users/647898', 'pm_score': 2, 'selected': False, 'text': '<p>This program always opens cmd.exe in the current path of your Explorer:\n<a href="https://github.com/jhasse/smart_cmd" rel="nofollow">https://github.com/jhasse/smart_cmd</a></p>\n\n<p>You can also pin it to your taskbar and then use WindowsKey+[1-0] as a keyboard shortcut.</p>\n'}, {'answer_id': 10135218, 'author': 'Hossein', 'author_id': 148203, 'author_profile': 'https://Stackoverflow.com/users/148203', 'pm_score': 6, 'selected': False, 'text': '<p>On Windows Vista, Windows 7 and Windows 10 simply hold down the <kbd>Shift</kbd> key and right-click on a folder. </p>\n\n<p>The context menu will contain an entry titled: "Open command window here"</p>\n\n<p><strong>Update:</strong> Type "cmd" in the address bar of Explorer and press <kbd>enter</kbd></p>\n\n<p><a href="https://i.stack.imgur.com/irrxh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/irrxh.png" alt="enter image description here"></a></p>\n\n<p><strong>Update 2:</strong> In windows 10, go to file menu and select "Open Windows PowerShell". There is an option for running as <strong>administrator</strong>.</p>\n\n<p><a href="https://i.stack.imgur.com/3GAxb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3GAxb.png" alt="enter image description here"></a></p>\n'}, {'answer_id': 21126366, 'author': 'Petr Novotny', 'author_id': 1225468, 'author_profile': 'https://Stackoverflow.com/users/1225468', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 22083233, 'author': 'totymedli', 'author_id': 1494454, 'author_profile': 'https://Stackoverflow.com/users/1494454', 'pm_score': 2, 'selected': False, 'text': '<p>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.</p>\n\n<p><img src="https://i.stack.imgur.com/naGaS.png" alt="Total Commander command line"></p>\n'}, {'answer_id': 22220883, 'author': 'Don Chakkappan', 'author_id': 2221895, 'author_profile': 'https://Stackoverflow.com/users/2221895', 'pm_score': 6, 'selected': False, 'text': '<p>From Windows 7 up to some versions of Windows 10, it is very simple to open a command prompt anywhere you wish, without navigation using command "cd". \nTry the following one.\nClick the mouse\'s right button by holding <kbd>Shift</kbd> key . </p>\n\n<p><img src="https://i.stack.imgur.com/VxAHr.png" alt="Sample"></p>\n\n<p>It will produce an option like this. Then simply select the "Open command window here " option.\nThe latest versions of Windows 10 have replaced this feature with "Open Powershell here".</p>\n'}, {'answer_id': 22341967, 'author': 'Abhishek Shrestha', 'author_id': 1194996, 'author_profile': 'https://Stackoverflow.com/users/1194996', 'pm_score': 4, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 23320681, 'author': 'san1deep2set3hi', 'author_id': 3487902, 'author_profile': 'https://Stackoverflow.com/users/3487902', 'pm_score': 8, 'selected': False, 'text': '<p>Assuming that in File Explorer you have opened the target directory/folder, do this:</p>\n\n<ol>\n<li><p>Click on address bar, alternatively press <kbd>Alt</kbd>+<kbd>D</kbd></p></li>\n<li><p>Now when address bar is highlighted, type <strong>cmd</strong> in the bar.</p></li>\n<li><p>Press Enter key</p></li>\n</ol>\n\n<p>You will notice that command prompt from that folder</p>\n'}, {'answer_id': 28795485, 'author': 'TiagoLr', 'author_id': 4052701, 'author_profile': 'https://Stackoverflow.com/users/4052701', 'pm_score': 4, 'selected': False, 'text': '<p>Also, here is a shortcut to open a console in any windows folder:</p>\n\n<ul>\n<li>Open any folder on windows explorer.</li>\n<li>Press <code>Alt + D</code> to focus the adress bar</li>\n<li>type <code>cmd</code> and press enter</li>\n</ul>\n\n<p>Very practical shortcut.</p>\n'}, {'answer_id': 33021825, 'author': 'Edward Gavilán', 'author_id': 5420048, 'author_profile': 'https://Stackoverflow.com/users/5420048', 'pm_score': 2, 'selected': False, 'text': '<p>With a Just-one-line file in batch:</p>\n\n<p>START "Desire_Path" // Without quotes puth the location that you want to start in with cmd</p>\n\n<p>Example (Open a text editor, place the code in there and save the file with a .bat extension):</p>\n\n<pre><code>START cd C:\\Users\n</code></pre>\n\n<p>Then just double click on it</p>\n\n<p>****Note: if you want the explorer to complete the task don´t put the CD command.</p>\n\n<p>*To do the opossite:</p>\n\n<p>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.</p>\n'}, {'answer_id': 33034123, 'author': 'TomCat', 'author_id': 2039603, 'author_profile': 'https://Stackoverflow.com/users/2039603', 'pm_score': 3, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 34534874, 'author': 'Forest Jackdaw', 'author_id': 5731710, 'author_profile': 'https://Stackoverflow.com/users/5731710', 'pm_score': 2, 'selected': False, 'text': "<p>This method is using <code>cmd.exe</code> and <code>Send to</code> shortcut so <code>cmd.exe</code> can open directory directly. This alternative method is in case of not having <code>Open command window here</code> in right click menu.</p>\n\n<ol>\n<li>Open 'File Explorer' and enter <code>shell:sendto</code> in location bar to navigate to <code>Send to</code> folder.</li>\n<li>Copy a <code>Command Prompt</code> shortcut or create a new shortcut <code>.lnk</code> file.</li>\n<li>Edit the properties of the shortcut and edit the target to <code>%windir%\\system32\\cmd.exe /k cd /d</code> and press 'OK' to save the change.</li>\n<li>Right click on a folder and expand <code>Send to</code> menu to use the <code>cmd</code> shortcut.</li>\n</ol>\n\n<p>This shortcut should open a <code>cmd</code> window with directory selected by the right click.</p>\n\n<p>This method should work under Window 7 and 10 at least. Name the shortcut as <code>Command Prompt (cd)</code> to specify the task of the shortcut.</p>\n\n<p>Possible error messages:</p>\n\n<ul>\n<li>Show 'The directory name is invalid.' if other than folder is\nselected.</li>\n<li>Show 'The system cannot find the drive specified.' if the folder is\nnot existed.</li>\n<li>Show 'The filename, directory name, or volume label syntax is incorrect.' if multiple files are selected.</li>\n</ul>\n\n<p>Little about shortcut: The directory would be automatically added to the end of the shortcut as a parameter when using under <code>Send to</code>, so the shortcut does not need to type in the directory. </p>\n"}, {'answer_id': 35293994, 'author': 'ofir_aghai', 'author_id': 2591785, 'author_profile': 'https://Stackoverflow.com/users/2591785', 'pm_score': 3, 'selected': False, 'text': '<p>In File Explorer, press and hold the <code>Shift</code> key, then <code>right click</code> or <code>press and hold</code> on a <code>folder</code> or <code>drive</code> that you want to open the command prompt at that location for, and <code>click/tap</code> on <code>Open Command Prompt Here</code> option.</p>\n'}, {'answer_id': 37605054, 'author': 'Syed. A', 'author_id': 1913743, 'author_profile': 'https://Stackoverflow.com/users/1913743', 'pm_score': 4, 'selected': False, 'text': '<p>Easiest way is to goto the address bar of the Windows Explorer and type <code>cmd</code> there. It will automatically open the command prompt window for you.</p>\n'}, {'answer_id': 37842393, 'author': 'Srinivas P', 'author_id': 6277401, 'author_profile': 'https://Stackoverflow.com/users/6277401', 'pm_score': 3, 'selected': False, 'text': '<p>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. \nIn case you want to see these steps with clear images you can check out </p>\n\n<p><a href="http://www.testingtools.co/general/how-to-open-command-prompt-in-a-specific-folder" rel="noreferrer"><strong>how to open command prompt in a specific folder directly</strong></a></p>\n'}, {'answer_id': 41578578, 'author': 'Guillermo', 'author_id': 686777, 'author_profile': 'https://Stackoverflow.com/users/686777', 'pm_score': 5, 'selected': False, 'text': '<p>Just write <code>cmd</code> in the address bar, it will open in the current folder.</p>\n'}, {'answer_id': 42082652, 'author': 'Pankaj Shrivastava', 'author_id': 6767365, 'author_profile': 'https://Stackoverflow.com/users/6767365', 'pm_score': 3, 'selected': False, 'text': '<p>For windows :\n<strong>Select</strong> the folder which you want to open in command prompt - After selection,\nKeeping the \'Shift key\' pressed. Right click there and choose option\n"open command window here"</p>\n'}, {'answer_id': 43006227, 'author': 'JasonXA', 'author_id': 2230275, 'author_profile': 'https://Stackoverflow.com/users/2230275', 'pm_score': 3, 'selected': False, 'text': '<p>Make the shortcut to cmd.exe with params /S /K pushd "C:\\YOUR FOLDER\\"</p>\n'}, {'answer_id': 43426901, 'author': 'cagcak', 'author_id': 2153187, 'author_profile': 'https://Stackoverflow.com/users/2153187', 'pm_score': 0, 'selected': False, 'text': '<p>For a better experience using a terminal in windows system, <a href="http://cmder.net/" rel="nofollow noreferrer">cmder</a> may help for a shortcut usage:</p>\n\n<ol>\n<li>Download <a href="http://cmder.net/" rel="nofollow noreferrer">cmder</a> into your system</li>\n<li>Make shortcut</li>\n<li>type <code>path_of_the_cmder</code> <code>/START</code> <code>target_path_wish_to_run</code></li>\n</ol>\n\n<p>For an instance:</p>\n\n<p><strong><code>TARGET</code></strong> -> <code>C:\\Users\\&lt;username&gt;i\\AppData\\Roaming\\cmder\\Cmder.exe /START C:\\SOURCE\\</code></p>\n'}, {'answer_id': 44212019, 'author': 'Niraj Shakya', 'author_id': 5383415, 'author_profile': 'https://Stackoverflow.com/users/5383415', 'pm_score': 1, 'selected': False, 'text': '<p>In windows 10, you just need one click to get cmd in any folder. \nJust hold <code>"shift + mouse right click "</code> in your desire folder and <code>cmd</code> will open with your folder path.</p>\n'}, {'answer_id': 45469822, 'author': 'FocusedWolf', 'author_id': 490748, 'author_profile': 'https://Stackoverflow.com/users/490748', 'pm_score': 3, 'selected': False, 'text': '<p>This will add entries to the context-menu to launch a command window that is automatically navigated to the directory you clicked.</p>\n\n<p>Usage:</p>\n\n<pre><code>Right-click a folder icon (or the empty background area inside an already open folder)\nand click either "Open in Terminal" or "Open in Terminal (Admin)".\n\nYou can also right click files to execute them with a command window.\nWhen the file is done running you are left with a command window that is navigated to the files directory.\n</code></pre>\n\n<p><a href="https://i.stack.imgur.com/buU1K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/buU1K.png" alt="enter image description here"></a></p>\n\n<p>Open_in_Terminal.reg</p>\n\n<pre><code>Windows Registry Editor Version 5.00\n\n; Admin versions.\n\n; Right click on a folder in a directory.\n[HKEY_CLASSES_ROOT\\Directory\\shell\\OpenCommandWindowHereAsAdministrator]\n@="Open in Terminal (Admin)"\n"Icon"="cmd.exe"\n"HasLUAShield"=""\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\Directory\\shell\\OpenCommandWindowHereAsAdministrator\\command]\n@="cmd.exe /c powershell.exe -Command \\"Start-Process cmd -Verb runas -ArgumentList \'/k pushd \\"%1\\"\'\\""\n\n; Right click on nothing in a directory, i.e. the "background" of the directory.\n[HKEY_CLASSES_ROOT\\Directory\\Background\\shell\\OpenCommandWindowHereAsAdministrator]\n@="Open in Terminal (Admin)"\n"Icon"="cmd.exe"\n"HasLUAShield"=""\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\Directory\\Background\\shell\\OpenCommandWindowHereAsAdministrator\\command]\n@="cmd.exe /c powershell.exe -Command \\"Start-Process cmd -Verb runas -ArgumentList \'/k pushd \\"%V\\"\'\\""\n\n; Right click on nothing in a library directory, i.e. the "background" of the library directory.\n[HKEY_CLASSES_ROOT\\LibraryFolder\\Background\\shell\\OpenCommandWindowHereAsAdministrator]\n@="Open in Terminal (Admin)"\n"Icon"="cmd.exe"\n"HasLUAShield"=""\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\LibraryFolder\\Background\\shell\\OpenCommandWindowHereAsAdministrator\\command]\n@="cmd.exe /c powershell.exe -Command \\"Start-Process cmd -Verb runas -ArgumentList \'/k pushd \\"%V\\"\'\\""\n\n; Right click on a file in a directory.\n[HKEY_CLASSES_ROOT\\*\\shell\\OpenWithCommandWindowAsAdministrator]\n@="Open in Terminal (Admin)"\n"Icon"="cmd.exe"\n"HasLUAShield"=""\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\*\\shell\\OpenWithCommandWindowAsAdministrator\\command]\n@="cmd.exe /c powershell.exe -Command \\"Start-Process cmd -Verb runas -ArgumentList \'/k pushd \\\\\\"%W \\\\\\" &amp;&amp; \\\\\\"%1\\\\\\"\'\\""\n\n; Non-Admin versions.\n\n; Right click on a folder in a directory.\n[HKEY_CLASSES_ROOT\\Directory\\shell\\OpenCommandWindowHere]\n@="Open in Terminal"\n"Icon"="cmd.exe"\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\Directory\\shell\\OpenCommandWindowHere\\command]\n@="cmd.exe /k pushd \\"%1\\""\n\n; Right click on nothing in a directory, i.e. the "background" of the directory.\n[HKEY_CLASSES_ROOT\\Directory\\Background\\shell\\OpenCommandWindowHere]\n@="Open in Terminal"\n"Icon"="cmd.exe"\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\Directory\\Background\\shell\\OpenCommandWindowHere\\command]\n@="cmd.exe /k pushd \\"%V\\""\n\n; Right click on nothing in a library directory, i.e. the "background" of the library directory.\n[HKEY_CLASSES_ROOT\\LibraryFolder\\Background\\shell\\OpenCommandWindowHere]\n@="Open in Terminal"\n"Icon"="cmd.exe"\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\LibraryFolder\\Background\\shell\\OpenCommandWindowHere\\command]\n@="cmd.exe /k pushd \\"%V\\""\n\n; Right click on a file in a directory.\n[HKEY_CLASSES_ROOT\\*\\shell\\OpenWithCommandWindow]\n@="Open in Terminal"\n"Icon"="cmd.exe"\n"Position"="middle"\n[HKEY_CLASSES_ROOT\\*\\shell\\OpenWithCommandWindow\\command]\n@="cmd.exe /k pushd \\"%W\\" &amp;&amp; \\"%1\\""\n</code></pre>\n\n<p>This took a lot of effort to make so if you\'re feeling generous then feel free to send a <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=3HVWGXQ9U9F5W&amp;currency_code=USD&amp;source=url" rel="nofollow noreferrer">paypal</a> donation to help me overcome the PTSD of debugging and testing it :)</p>\n\n<p>An uninstaller if you need one:</p>\n\n<p>Open_in_Terminal_Remover.reg</p>\n\n<pre><code>Windows Registry Editor Version 5.00\n\n[-HKEY_CLASSES_ROOT\\Directory\\shell\\OpenCommandWindowHereAsAdministrator]\n[-HKEY_CLASSES_ROOT\\Directory\\Background\\shell\\OpenCommandWindowHereAsAdministrator]\n[-HKEY_CLASSES_ROOT\\LibraryFolder\\Background\\shell\\OpenCommandWindowHereAsAdministrator]\n[-HKEY_CLASSES_ROOT\\*\\shell\\OpenWithCommandWindowAsAdministrator]\n[-HKEY_CLASSES_ROOT\\Directory\\shell\\OpenCommandWindowHere]\n[-HKEY_CLASSES_ROOT\\Directory\\Background\\shell\\OpenCommandWindowHere]\n[-HKEY_CLASSES_ROOT\\LibraryFolder\\Background\\shell\\OpenCommandWindowHere]\n[-HKEY_CLASSES_ROOT\\*\\shell\\OpenWithCommandWindow]\n</code></pre>\n'}, {'answer_id': 45563746, 'author': 'Mendi Barel', 'author_id': 2840531, 'author_profile': 'https://Stackoverflow.com/users/2840531', 'pm_score': 3, 'selected': False, 'text': '<p><strong>pushd</strong> command sets the current folder. so:</p>\n<pre><code>cmd /k &quot;pushd D:\\Music&quot;\n</code></pre>\n'}, {'answer_id': 50402811, 'author': 'Arman Fatahi', 'author_id': 2098287, 'author_profile': 'https://Stackoverflow.com/users/2098287', 'pm_score': 4, 'selected': False, 'text': '<p>If you are starting cmd from taskbar, this is what you need to do:</p>\n\n<p>right click --> rightclick on Command Prompt --> Properties</p>\n\n<p><a href="https://i.stack.imgur.com/NMFBt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NMFBt.png" alt="enter image description here"></a></p>\n\n<p>Then in the properties window change the value of <strong>Start in</strong>:</p>\n\n<p><a href="https://i.stack.imgur.com/1oI8t.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1oI8t.png" alt="enter image description here"></a></p>\n\n<p><strong>This solution doesn\'t work for opening command prompt as administrator</strong></p>\n'}, {'answer_id': 50422879, 'author': 'curiousBoy', 'author_id': 2166856, 'author_profile': 'https://Stackoverflow.com/users/2166856', 'pm_score': 2, 'selected': False, 'text': '<p>Rather than saving it as a shortcut, this is how I do it and I find it very useful. There are already answers to show as a shortcut, but I just wanted to share this, especially I find it very useful for angular projects.</p>\n\n<ul>\n<li>Create a new txt file \nand write the following code into it.<br>\n<code>@ECHO OFF \ncd C:\\YourProjectPath\\FolderPath\\</code></li>\n<li><p>save as .bat file with a convenient name. (I usually save it as\n"goto-myProjectName.bat"</p></li>\n<li><p>Then copy that bat file into your default path (when you run the cmd,\nwhatever is your default path, it starts with that. For instance, on\nmy machine it is windows/system32)</p></li>\n<li>Then type your bat file\'s name without  its extension. </li>\n<li>For instance:<code>goto-myProjectName</code></li>\n</ul>\n\n<p>Then it should take you to there.</p>\n'}, {'answer_id': 52266173, 'author': 'Alex T', 'author_id': 2658643, 'author_profile': 'https://Stackoverflow.com/users/2658643', 'pm_score': 2, 'selected': False, 'text': '<p>In my case I VERY SPECIFICALLY wanted an opened CMD window in ADMIN mode in a specific folder.   Here\'s how (works for Windows 7):</p>\n\n<p>In the target folder, create START.BAT that simply contains one line:</p>\n\n<pre><code>  start cd c:\\MyTargetFolder\n</code></pre>\n\n<p>Drag a shortcut from START.BAT and call it "START AS ADMIN".</p>\n\n<p>Right-click the shortcut and select "Run as Administrator" and "Run Minimized".  Also make sure that the "Start In" will cause the same drive to be selected (as CD does not change the drive!).</p>\n\n<p>When you click on that shortcut you will get the UAC prompt and then an open command window in the desired folder.  The title bar will show that this CMD window is in ADMINISTRATOR mode.</p>\n'}, {'answer_id': 53468167, 'author': 'Vinay', 'author_id': 9814965, 'author_profile': 'https://Stackoverflow.com/users/9814965', 'pm_score': 5, 'selected': False, 'text': '<p>In windows go to folder location in file explorer remove path and type cmd and press enter. and path will open in cmd.</p>\n'}, {'answer_id': 54509418, 'author': 'Craigo', 'author_id': 418057, 'author_profile': 'https://Stackoverflow.com/users/418057', 'pm_score': 1, 'selected': False, 'text': '<p>Windows 10 File Explorer now has a "Quick Access Toolbar".</p>\n\n<p>Just press "Alt+F" to open the file menu, navigate to the "Open Windows PowerShell" menu, right click and select "Add to Quick Access Toolbar":</p>\n\n<p><a href="https://i.stack.imgur.com/rRkHD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rRkHD.png" alt="enter image description here"></a></p>\n\n<p>Now you will get a little icon that you can click on, that will open PowerShell in the directory you are in:\n<a href="https://i.stack.imgur.com/QTe8F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QTe8F.png" alt="enter image description here"></a></p>\n'}, {'answer_id': 56252766, 'author': 'vidy', 'author_id': 9993935, 'author_profile': 'https://Stackoverflow.com/users/9993935', 'pm_score': 3, 'selected': False, 'text': '<p>In Windows go to the specific folder, then click on the file explorer path and remove it then type cmd and click enter.. and in cmd your specific folder with its path will open..</p>\n'}, {'answer_id': 56254760, 'author': 'Gerold Broser', 'author_id': 1744774, 'author_profile': 'https://Stackoverflow.com/users/1744774', 'pm_score': 2, 'selected': False, 'text': '<p>Despite a few answers for <code>HKCR\\Directory\\shell</code> under Windows 10 (which did not work) the following worked for me:</p>\n\n<p><strong>SetOpenCmdHere.reg</strong></p>\n\n<pre><code>Windows Registry Editor Version 5.00\n\n[HKEY_CLASSES_ROOT\\Folder\\shell\\cmd]\n@="Open CMD here..."\n\n[HKEY_CLASSES_ROOT\\Folder\\shell\\cmd\\command]\n@="C:\\\\Windows\\\\system32\\\\cmd.exe /k pushd \\"%1\\""\n</code></pre>\n'}, {'answer_id': 56489448, 'author': 'U.A', 'author_id': 11000016, 'author_profile': 'https://Stackoverflow.com/users/11000016', 'pm_score': 1, 'selected': False, 'text': '<p>Why that much of setup, for this simple matter, when your on the path in cmd just enter</p>\n\n<pre><code>start .\n</code></pre>\n\n<p>and press Enter</p>\n'}, {'answer_id': 56977157, 'author': 'Quantum Dreamer', 'author_id': 5891408, 'author_profile': 'https://Stackoverflow.com/users/5891408', 'pm_score': 3, 'selected': False, 'text': '<p>This answer is for windows 10.</p>\n\n<p>Create a command prompt shortcut in the folder wherever you want, then right click on that shortcut \n<a href="https://i.stack.imgur.com/1bcj5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1bcj5.png" alt="type your target in start in field"></a></p>\n\n<p>and </p>\n\n<p><a href="https://i.stack.imgur.com/wKNKx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wKNKx.png" alt="Here you go"></a></p>\n'}, {'answer_id': 66318127, 'author': 'therealcain', 'author_id': 8298564, 'author_profile': 'https://Stackoverflow.com/users/8298564', 'pm_score': 2, 'selected': False, 'text': '<p>Another easy solution is to install <a href="https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab" rel="nofollow noreferrer">Windows Terminal</a>.</p>\n<p>And then you automatically have &quot;Open in Windows Terminal&quot; when you right-click on a folder:</p>\n<p><a href="https://i.stack.imgur.com/hiWuc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hiWuc.jpg" alt="enter image description here" /></a></p>\n'}, {'answer_id': 68227863, 'author': 'Julien Jm', 'author_id': 12814623, 'author_profile': 'https://Stackoverflow.com/users/12814623', 'pm_score': 3, 'selected': False, 'text': '<p><strong>&lt;===||==========&gt; On Windows 10 &lt;==========||===&gt;</strong></p>\n<hr />\n<p>Assuming that in File Explorer you have opened the target directory/folder, do this :</p>\n<ol>\n<li><p>Click on address bar, alternatively press <code>Alt</code> + <code>A</code></p>\n</li>\n<li><p>Now when address bar is highlighted, type <code>cmd</code> in the bar.</p>\n</li>\n<li><p>Press <code>Enter</code> key</p>\n</li>\n</ol>\n<hr />\n<p>For a powershell window :</p>\n<ol>\n<li>Just press <code>Alt</code> + <code>f</code> + <code>s</code> + <code>a</code></li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/60904', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/44972/']