GIS burdGIS logo

Command Prompt Here in Windows

If you use command prompt it can get really tiresome typing in pathnames. This quick tutorial will give you some tips on how to open command prompt (cmd) at your current location from windows explorer. I find this really useful for running various scripts. For example, merging together multiple .pdf files to create the manuals for GIS training courses. Open windows explorer, navigate to the scripts folder and open a cmd window right there. Then it's just a case of typing, 'python'


So a couple of quick ways to do this are firstly to just type "cmd" in the address window for your current location:

Alt cmd-searchbar

A command prompt window should pop up with the path set to the location of the folder you were at.

The second easy way to do the same thing is simply to hold the shift key down and right-click in your current location. You should notice that there's more options on the context menu than usual, one of which is "open command window here".

Alt hold-shift

Note if you have a file selected and do the same thing (hold shift and right click) you get the option of "copy as path"... that can also be really useful.

So those are some shortcuts to achieve the same thing. If you use it all the time and want to make the option of "open command window here" appear by default then you can do the following:

  1. Go to the windows 8 front page and type "run" (or type run in the start menu search bar in Windows 7).
    Alt open-run
  2. With the run tool open type "regedit" and then navigate to HKEY_CLASSES_ROOT\Directory\shell\cmd
    Alt hkey-classes
  3. When you highlight the cmd folder you should see a value in the right hand pane called "extended". Delete it.
    Alt cmd-extended
  4. Now navigate to HKEY_CLASSES_ROOT\Drive\shell\cmd and delete the extended key there.
  5. You're all done! Happy coding / scripting / geeking.


all articles
map stories


Sign-up for our monthly newsletter.

What now?

If you enjoyed this post and would like to learn more about GIS or improve your skills check out our training courses. If you'd like to contribute a story, tutorial or anything else, please contact us.

Thanks for reading and if you'd like to support our content please feel free to buy us a coffee.