Open Command Prompt or PowerShell from Any Folder
In this article
This guide shows you how to open Command Prompt or PowerShell directly from any folder in Windows, saving you the hassle of typing long paths or navigating through multiple menus. You'll learn several built-in methods that work across Windows 10 and Windows 11, plus keyboard shortcuts and tips for power users.
What You'll Need
- A Windows PC (Windows 10 or Windows 11)
- Access to File Explorer (the folder icon on your taskbar)
- Basic familiarity with right-clicking and using keyboard shortcuts
Step-by-Step
- Open File Explorer – Click the folder icon on your taskbar or press Win + E.
- Navigate to your target folder – Browse to the location where you want to open the command prompt or PowerShell. It can be any folder, including network locations or drives.
- Use the address bar shortcut (quickest) – Click once on the address bar at the top of File Explorer (it shows the current path like
C:\Users\YourName). Typecmdorpowershelland press Enter. A new window opens with the command line already set to that folder. - Use the File menu (Windows 10) – In File Explorer, click the File menu in the top-left corner. Then choose either Open Windows PowerShell or Open Command Prompt. You'll see sub-options: Open as administrator if you need elevated privileges.
- Use the right-click context menu (Windows 11) – Right-click on an empty area inside the folder (not on a file). In the context menu, click Open in Terminal. This opens Windows Terminal, which includes tabs for PowerShell and Command Prompt. If you want the classic separate windows, you can use the address bar method instead.
- Use Shift + Right-Click (classic method) – Hold down the Shift key and right-click on an empty area inside the folder. In the menu that appears, you'll see Open PowerShell window here (Windows 10) or Open in Terminal (Windows 11). On older Windows versions, it might say Open command window here.
- Use the search bar in the folder – If you're in a folder that has a search bar (usually top-right), click in it, type
cmdorpowershell, and press Enter. This opens the command line at that folder. - Create a desktop shortcut (optional) – Right-click on your desktop, select New > Shortcut. In the location field, type
cmd.exeorpowershell.exe. Name it something like "Command Prompt Here". When you use this shortcut, it will open at your user profile folder, not the current folder, so it's less useful for this purpose.
Common Mistakes
- Right-clicking on a file instead of empty space – The context menu options only appear when you right-click on the background of the folder, not on a file or icon.
- Typing in the wrong place – The address bar trick only works if you click on the address bar itself. Typing in the search box won't open a command prompt.
- Using the wrong key combination – Some users press Ctrl + Shift + right-click, which doesn't do anything special. It's Shift + right-click.
- Expecting the command prompt to open in the folder you're viewing – If you use the File menu or context menu, it opens in the current folder, but if you use a desktop shortcut, it opens in your home directory. Pay attention to the path shown in the title bar of the command prompt.
- Not having permission – If you try to open as administrator but your account isn't an admin, you'll get a UAC prompt. If you don't have admin rights, you can still open a regular command prompt.
Tips
- Use the address bar for any folder – This is the fastest method. You can even type
cmdwhile in a network location or a mapped drive. - Pin PowerShell or Terminal to your taskbar – Right-click on the Start menu icon for PowerShell or Terminal and select "Pin to taskbar". Then you can open it quickly, but you'll still need to navigate to your folder.
- Use the "Open in Terminal" feature – In Windows 11, Terminal is the default. You can switch between PowerShell and Command Prompt by clicking the dropdown arrow next to the tab.
- Open as administrator when needed – Many commands require admin rights. Use the File menu or right-click and choose "Run as administrator" to avoid permission errors.
- Learn the keyboard shortcut for the address bar – Press Alt + D to jump directly to the address bar, then type
cmdand press Enter. This works in all Windows versions.
Troubleshooting
- The address bar method doesn't work – Make sure you're typing in the address bar (the bar that shows the path, not the search box). If you see a dropdown of suggestions, that's the address bar. If it's not working, try pressing Alt + D first to focus it.
- Right-click menu doesn't show "Open in Terminal" – This is a Windows 11 feature. If you're on Windows 10, use the File menu or Shift+right-click. If you're on Windows 11 and it's missing, make sure Windows Terminal is installed (it's default, but can be removed). You can reinstall it from the Microsoft Store.
- Shift+right-click shows "Open PowerShell window here" but you want Command Prompt – In Windows 10, you can change this by going to Settings > Personalization > Taskbar and toggling "Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows key+X". But for the folder context menu, you can't easily change it. Use the address bar method or the File menu instead.
- Command prompt opens in the wrong directory – If you used a shortcut or a different method, it might open in your home folder. Always verify the path in the title bar. To change to the folder you want, use the
cd /dcommand followed by the full path, e.g.,cd /d C:\Users\YourName\Documents. - "Access is denied" error when opening as administrator – This usually means your user account doesn't have admin privileges. Contact your system administrator or use a standard (non-admin) prompt for basic commands.
Frequently Asked Questions
Can I open Command Prompt from a folder using the keyboard only?
Yes. Press Alt + D to focus the address bar, type cmd, and press Enter. This works without using the mouse.
What's the difference between Command Prompt and PowerShell?
Command Prompt (cmd.exe) is the classic Windows command-line interpreter. PowerShell is a more advanced shell with scripting capabilities and access to the .NET framework. For most basic commands, they work similarly, but PowerShell has more features.
How do I open an elevated (admin) command prompt from a folder?
Use the File menu in Windows 10 and select "Open Windows PowerShell as administrator" or "Open Command Prompt as administrator". In Windows 11, right-click and choose "Open in Terminal", then click the dropdown arrow next to the tab and select "Settings" to make it always open as admin, or use Ctrl+Shift+Enter when launching Terminal.
Can I open a command prompt in a network folder?
Yes, you can navigate to a network location in File Explorer and use the address bar method. The command prompt will open with that UNC path (e.g., \\server\share).
Why does the right-click menu not show "Open command window here" anymore?
In Windows 10, Microsoft replaced it with "Open PowerShell window here". In Windows 11, it's "Open in Terminal". You can still get the classic option by holding Shift and right-clicking, but it may still show PowerShell. To get Command Prompt, use the address bar method or the File menu.
Is there a way to open Command Prompt in the current folder from the Start menu?
No, the Start menu shortcut opens in your user profile folder. You need to use File Explorer methods to open it in a specific folder. Alternatively, you can open Command Prompt and use the cd command to navigate.