Windows Explorer "Command Prompt Here"

recursive picture recursive · Dec 18, 2008 · Viewed 148.7k times · Source

I frequently find myself with a folder open in Windows, wishing to have a command prompt open with the same working directory.

I am aware of Power Toys "Command Prompt", but that only works as a context menu item on the folder, and not from inside the folder if you are already there. I know you can navigate to the parent directory, and use it from there, but if the parent has thousands of directories in it, this is not so convenient. I have tried some home-brewed batch files associated with folder actions in explorer, but those suffer from similar problems.

So, what is the quickest way to open a command prompt with a working directory of the current windows explorer folder?

My current approach: (horrible)

  • Alt - D, Ctrl - C (copy path)
  • Win - R, "cmd", Enter (start command prompt)
  • "cd", Space (start a change directory command)
  • Alt - Space, e, p (paste directory)
  • Enter (execute change directory)

I know there is something better! What is it?

Answer

clawr picture clawr · Dec 19, 2008

Hold Shift while Right-Clicking a blank space in the desired folder to bring up a more verbose context menu. One of the options is Open Command Window Here. This works in Windows Vista, 7, 8, and 10. Since Windows 10 Creators Update, the option has been replaced with Open PowerShell Here. However, there are ways to enable Open Command Window Here again.