Open Command Prompt in Any Folder (No cd Needed)

Need a Command Prompt in the folder you're looking at? Press Alt + D, type cmd and press Enter. It opens already in that folder.

Open Command Prompt in Any Folder (No cd Needed)

You have a folder open in File Explorer and you need a Command Prompt that is already sitting in that folder. Most people open Command Prompt from the Start menu and then type a long cd command to get there. You don’t need to.

Video: Open Command Prompt in Any Folder, recorded on Windows 11.

The quick way: type cmd in the address bar

This works on Windows 11 and Windows 10.

  1. Open the folder in File Explorer.
  2. Press Alt + D to jump to the address bar (or just click it). The folder path is highlighted.
  3. Type cmd and press Enter.

Command Prompt opens with that folder as the current directory, so you can run your command straight away.

Want PowerShell or Windows Terminal instead?

The same trick works with other names. Type one of these in the address bar and press Enter:

  • powershell opens Windows PowerShell in that folder.
  • pwsh opens PowerShell 7, if you have it installed.
  • wt opens Windows Terminal. Add -d . after it (so wt -d .) to make sure it starts in the current folder.

Other ways to do the same thing

  • On Windows 11, right-click an empty part of the folder and choose Open in Terminal.
  • On Windows 10, hold Shift, right-click an empty part of the folder and choose Open PowerShell window here.

If you need it as administrator

The address bar method opens a normal prompt, not an elevated one. If your command needs admin rights, open Command Prompt as administrator from the Start menu, then copy the folder path from the address bar (Alt + D, then Ctrl + C) and type cd /d followed by a space and the pasted path.

When it doesn’t work

If typing cmd in the address bar runs a search instead, the folder you’re in is probably a library or a search result rather than a real folder. Open the actual folder (right-click the file and choose Open file location) and try again.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Intune, Active Directory, PowerShell and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published 770+ practical guides to real-world IT problems. He also builds free Windows utilities, including Ultimate Settings Panel, which has been downloaded over 850,000 times.

Leave a Reply

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


Part of The Geek Network