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.
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:
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.
Next, type in cmd .
and hit enter to launch a command prompt at the current Explorer location.
Lo, and behold, a command prompt appears, queued up and waiting for you at the current Windows Explorer folder like so:
I hope you find this useful!