Launching a Windows Command Prompt in a Folder of Your Choice

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

4 thoughts on “Launching a Windows Command Prompt in a Folder of Your Choice

Leave a Reply

Your email address will not be published. Required fields are marked *