How To Open Files and Folders in Command Prompt on Windows
If you’ve ever seen someone quickly type commands instead of clicking through menus, they were probably using Command Prompt (often called cmd). Learning how to “open in Command Prompt” can save time, help with troubleshooting, and unlock tools that don’t even have a normal window.
This guide walks through what Command Prompt is, different ways to open it, and how to open specific folders or files from it—without assuming you’re a programmer.
What “Open in Command Prompt” Actually Means
People usually mean one of three things when they say “open in Command Prompt”:
Open the Command Prompt window itself
For example, launching the black text window where you can type commands.Open Command Prompt in a specific folder
So when it opens, you’re already “inside” a folder likeC:UsersYourNameDocuments.Open a file, program, or folder from Command Prompt
For example, launching Notepad, a.batscript, or File Explorer using commands.
All three are related, but they involve slightly different steps and depend on things like your Windows version and user permissions.
Ways To Open Command Prompt on Windows
1. Open Command Prompt from the Start Menu
This works on most recent versions of Windows (10, 11, and earlier).
Normal (non-admin) Command Prompt
- Click the Start button (Windows logo).
- Type
cmdorcommand prompt. - Click Command Prompt in the results.
Administrator Command Prompt (elevated)
Some commands require administrator rights (for example, changing system settings).
- Click Start.
- Type
cmd. - Right‑clickCommand Prompt.
- Choose Run as administrator.
- If asked, confirm or enter an admin password.
You’ll know it’s elevated if the window title includes “Administrator: Command Prompt”.
2. Open Command Prompt via Run Dialog
This is quick once you remember the shortcut.
Press Windows key + R on your keyboard.
In the Run box, type:
cmdPress Enter or click OK.
To open an admin Command Prompt using Run:
- Press Windows + R.
- Type
cmd. - Press Ctrl + Shift + Enter together.
- Approve the admin prompt.
3. Open Command Prompt in a Specific Folder (File Explorer)
If you want Command Prompt to start already pointing at a particular folder:
Method A: Type cmd in the address bar
Open File Explorer.
Navigate to the folder you want.
Click the address bar (where it says something like
C:UsersYourNameDocuments).Type:
cmdPress Enter.
A Command Prompt will open with that folder set as the current directory.
Method B: Shift + Right‑click in the folder
On many Windows setups:
- Open File Explorer and go to the folder.
- Hold down Shift.
- Right‑click an empty area in the folder.
- Look for an option like:
- Open command window here (older Windows versions), or
- More commonly now: Open PowerShell window here or Open in Terminal.
Newer Windows versions tend to show Windows Terminal or PowerShell instead of cmd. These can still run Command Prompt, but the menu wording may be different.
4. Open Command Prompt from Task Manager
Useful if your Start Menu or desktop isn’t responding.
Press Ctrl + Shift + Esc to open Task Manager.
- Or press Ctrl + Alt + Delete and choose Task Manager.
Click File > Run new task.
In the box, type:
cmdTo run as admin, check “Create this task with administrative privileges”.
Click OK.
5. Open Command Prompt from Windows Terminal or PowerShell
On Windows 10 and 11, Microsoft is pushing Windows Terminal and PowerShell instead of plain cmd, but Command Prompt is usually still available.
From Windows Terminal:
- Open Windows Terminal (search “terminal” in Start).
- Click the down arrow next to the plus (+) tab button.
- Choose Command Prompt (if it’s listed as a profile).
From PowerShell:
If you’re in a PowerShell window and want to start a Command Prompt session, type:
cmd and press Enter.
How To Open Folders and Files From Command Prompt
Once Command Prompt is open, you can navigate your computer and launch things from it.
Changing Folders with cd
The current directory (folder) is shown at the prompt, for example:
C:UsersYourName> To move into a folder:
cd Documents To move up one level:
cd .. To jump directly to a specific path:
cd C:UsersYourNameDocuments If the path has spaces, use quotes:
cd "C:Program Files" Listing What’s in a Folder with dir
Use:
dir to show files and subfolders in the current directory.
Opening a Folder in File Explorer from Command Prompt
To open the current folder in File Explorer:
start . To open a specific folder:
start C:UsersYourNameDocuments Again, if the path has spaces:
start "" "C:Program Files" (The empty quotes "" act as a placeholder for the window title.)
Opening Programs from Command Prompt
If a program is in your system’s PATH or you’re in its folder, you can just type its name:
notepad to open Notepad.
With a file:
notepad myfile.txt If the file is in a different folder:
notepad "C:UsersYourNameDesktop otes.txt" Other examples (if installed and in PATH):
calc # Calculator mspaint # Paint (You don’t need the # part; that’s just a comment here for explanation.)
Opening Files with Their Default App
The start command tells Windows to open a file with whatever app normally handles that file type.
In the current folder:
start myfile.pdf With a full path:
start "" "C:UsersYourNameDownloads eport.pdf" Windows will launch your default PDF viewer.
This works for many file types: images, documents, videos, and more.
Factors That Change How You Open Command Prompt
The exact steps and options can vary based on several variables:
1. Windows Version
Different Windows versions handle Command Prompt a bit differently.
| Windows Version | How Command Tools Appear |
|---|---|
| Windows 7 | Command Prompt is primary; “Open command window here” is common. |
| Windows 8/8.1 | Similar to 7, but more emphasis on PowerShell in some updates. |
| Windows 10 | Command Prompt still present; PowerShell and Windows Terminal may be integrated. |
| Windows 11 | Windows Terminal is default; context menus often show “Open in Terminal” instead of “Command Prompt”. |
If you see PowerShell or Windows Terminal instead of Command Prompt, you can often still run cmd inside them, but the menu wording changes how you “open in Command Prompt.”
2. User Permissions (Standard vs Admin)
Some commands need administrator rights:
- Changing system files
- Editing certain registry or network settings
- Running some scripts or tools in protected locations
Whether you open Command Prompt normally or as administrator can be the difference between “Access denied” and a successful command.
3. System Environment (PATH and Install Locations)
Whether you can simply type programname in Command Prompt depends on:
- Whether that program’s folder is in the PATH environment variable
- Whether you are currently in the folder where the program lives
On some systems, you’ll need full paths like:
"C:SomeFolderMyTool.exe" on others, mytool might just work from anywhere.
4. Interface Settings and Group Policies
On work or school computers, IT might:
- Replace Command Prompt with PowerShell or Terminal
- Disable certain right‑click options
- Block access to elevated (admin) prompts
This changes which menu items you see when trying to “open here in Command Prompt.”
Different User Profiles, Different Ways to Use Command Prompt
“Opening in Command Prompt” can mean very different workflows depending on who you are and what you’re doing.
Casual Home User
- Might open Command Prompt occasionally to:
- Run a single troubleshooting command
- Follow online instructions
- Likely to use:
- Start menu search for
cmd - Simple navigation with
cdanddir
- Start menu search for
- Less likely to need admin access regularly, but may occasionally use Run as administrator when instructed.
Power User or Gamer
- May use Command Prompt to:
- Run scripts
- Manage game files or mods
- Use tools that don’t have a graphical interface
- Often uses:
- Shift + right‑click in a folder (or Terminal equivalents)
- Shortcuts like Win + R and
cmd
- Might care about PATH settings and custom tools.
Developer or IT Professional
- Frequently opens Command Prompt in specific project folders.
- May prefer:
- Windows Terminal profiles that default to Command Prompt.
- Context menu options like Open in Terminal.
- Often runs commands with admin rights and uses advanced scripting, batch files, and automation.
Managed / Work Computer User
- May be limited by policies:
- No admin Command Prompt
- Certain tools or commands blocked
- Might only have access to PowerShell or a restricted shell.
- How they open Command Prompt (or whether they can at all) is controlled by IT.
Why Your Own Setup Matters
The core ideas—using cmd, cd, dir, and start—are the same on almost all modern Windows systems. But how you actually open Command Prompt, and what you can do once it’s open, depends heavily on:
- Which version of Windows you’re running
- Whether you’re on a personal machine or a managed work/school device
- Your permission level (standard user vs administrator)
- Whether tools you want to run are in your PATH or tucked away in specific folders
- How comfortable you are with command‑line navigation
Understanding the building blocks above gives you the framework. The exact approach that fits best comes down to the details of your own Windows setup, what you’re trying to accomplish, and how much control you have over the machine you’re using.