How to Open Command Prompt in a Folder

Initiate commands directly from anywhere you like

What to Know

  • Type cmd into the search bar to open the command prompt.
  • Shift + right click in a window, then click Open PowerShell Window here to access the PowerShell interface.
  • Open the folder you wish to access, then type cmd into the folder path at the top of the window to open a command prompt within the folder.

This article teaches you how to open the command prompt window in a folder in Windows 10 and how to open a command prompt anywhere within Windows 10. It also explains why you may wish to do so. 

How Do I Open Command Prompt in Windows 10?

If you want to open a command prompt anywhere in Windows 10 and browse to the relevant folder yourself, the process is straightforward and can be accessed within moments. Here's where to look.

  1. On the Windows 10 search bar, type cmd.

    Windows 10 desktop with Search Bar highlighted
  2. Click Run as Administrator to open the command prompt with full access rights to do whatever you need to do.

    Windows 10 desktop with cmd in search bar and Run as Administrator highlighted

How to Open Command Prompt in a Folder

Suppose you're looking to directly open a command prompt window within a folder in Windows 10 to initiate a command. In that case, there are a couple of different ways of doing so. Here's the quickest way to do so using a keyboard shortcut in File Explorer.

  1. On your Windows 10 PC, open the folder you wish to open the command prompt within.

    Windows 10 with a folder open
  2. Press Shift on your keyboard and Right Click on your mouse.

  3. Left-click Open PowerShell window here.

    Windows 10 folder with Open PowerShell window here highlighted
  4. You now have a PowerShell window open located at the folder you were previously looking at, and can use this window to run some command prompts.

How Do I Open a Terminal Window in a Folder?

A Terminal window is traditionally what the command line prompt refers to on Macs, but it can be used with Windows PCs rather than a simple command prompt. Here's a different way to open a command prompt (or Windows Terminal) within a folder in Windows 10.

Windows Terminal has its own tool. Once installed (instructions in the link above), you can right-click in any folder and choose Open in Windows Terminal to get to it.

  1. Open the folder you wish to open the command prompt window from.

  2. Type cmd into the location bar at the top of the window and tap enter.

    Windows 10 folder with the search/location bar highlighted
  3. The command prompt will now be opened in the desired location. 

Why Would I Use the Command Prompt Tool? 

The Windows 10 command prompt tool is ideal if you want to run a program using particular parameters. Windows 10 has both the command prompt and the PowerShell interface, with both offering a similar-looking experience but with slight variations in terms of the commands, you can enter. You won't see a difference for the most part, but specific commands will need you to use one or the other. 

A list of command prompts can help you do more complicated things with your PC. But be careful what you do in the command prompt interface, as some commands can be potentially catastrophic if misused. 

Microsoft is encouraging users to use PowerShell rather than Command Prompt so you may see it used more so in some examples. 

FAQ
  • What is Command Prompt?

    It's a command-line interpreter program that's available on all Windows PCs. It's often used to perform more advanced administrative functions or to troubleshoot an issue. The commands you can use depend on which version of Windows you own.

  • How do you clear Command Prompt?

    Type "cls" and press Enter. This clears all of the previous commands you entered.

  • Can I use copy/paste in Command Prompt?

    Yes, but you need to enable it first. Open Command Prompt, right-click on the top bar, and select Properties. Under Edit Options, select the checkbox next to Use Ctrl+Shift+C/V as Copy/Paste.

Was this page helpful?