Launching a Windows Command Prompt in a Folder of Your Choice

Published February 15, 2016 · 2 min ·  

Command-Line
Summary

Launching a Windows command prompt in a specific folder can be streamlined using a simple shortcut in Windows Explorer. Instead of navigating through directories with the cd command, you can easily open a command prompt at your desired location by clicking to the right of the address bar to copy the current file path, then typing cmd . and hitting enter. This method saves time and makes it more convenient to run commands directly in the folder you are working in, enhancing productivity.

Here’s a handy Windows shortcut I use quite frequently for launching a Windows command prompt in a specific folder using Windows Explorer. Thanks to fellow San Diegan Jon Galloway for teaching me this shortcut in one of his Microsoft Virtual Academy classes.

Scenario: You are navigating through Windows Explorer to a folder of interest and realize that you need to drop down into a command prompt to run a specific command in that folder. For example, you want to launch Visual Studio Code from the command prompt using code . in that folder. Windows Explorer

You click the Windows key on your keyboard and type

cmd.exe or type Command to bring up an option to launch the “Command Prompt"program in the start menu. This brings up a shiny new command line prompt such as this one: Windows command prompt

You are then faced with needing to use the cd command to change directories and navigate to a file location in a faraway place, perhaps even on a different drive. Is there an easier way?

Absolutely! Click to the right of the text in the address bar to get the current file path with backslashes. Windows Explorer - click to right

Next, type in cmd . and hit enter to launch a command prompt at the current Explorer location. Windows Explorer - click cmd in the address bar

Lo, and behold, a command prompt appears, queued up and waiting for you at the current Windows Explorer folder like so: Command Prompt - at location of choice

I hope you find this useful!

Share this Article