Right-click a folder or empty space in File Explorer and select Open in Terminal to start Windows Terminal in that folder, or type wt -d . in the address bar to do the same from the keyboard.
This guide covers both directions: opening Terminal from File Explorer, and opening folders and files in File Explorer and their apps from Command Prompt or PowerShell, plus a custom context menu entry and fixes when the folder is wrong.
Open a terminal to a specific folder: Context menu (fastest, most discoverable)
What it does: the context menu entry starts Windows Terminal with its working directory already set to the folder you clicked, so you skip typing a long cd path.
Why use it: it is the most discoverable route and needs no typing, which makes it the best step-by-step method for a beginner. It takes well under a minute.
- Open File Explorer with Windows + E and go to the folder you want.
- Right-click the folder, or right-click an empty area inside it.
- Select Open in Terminal.
- Check the prompt: it shows the folder path, so commands now run there.
Notes and gotchas: Terminal opens your default profile, usually PowerShell. To get Command Prompt instead, change the default profile under Terminal Settings > Startup. If the entry is not in the compact Windows 11 menu, select Show more options.

Background
File Explorer and the command line point at the same file system. The bridge is simply a way to hand the current folder from one to the other.
| Piece | Role in the workflow |
|---|---|
| File Explorer | Browses folders and shows the current path in the address bar |
| Windows Terminal (wt.exe) | Hosts PowerShell, Command Prompt and WSL tabs; the default console host since Windows 11 version 22H2 |
| PowerShell | Default Terminal profile; opens files with Invoke-Item (alias ii) |
| Command Prompt (cmd.exe) | Opens files and folders with start |
| Starting directory | The folder a Terminal tab opens in; set per profile or with wt -d |
| Context menu verbs | Registry entries that add commands such as Open in Terminal to a right-click menu |
The quick overview of how the pieces fit together: Explorer passes a folder path to wt, and the shell passes a path back to Explorer with start . or ii ..
Open Windows Terminal from the File Explorer address bar (keyboard fast‑lane)
Why use the address bar: your hands stay on the keyboard, and you can pass Terminal options such as a profile name at the same time.
- In File Explorer, open the folder you want to work in.
- Click an empty part of the address bar so the folder path is selected.
- Type
wt -d .and press Enter. - Windows Terminal opens a new tab whose working directory is that folder.
The dot means the current folder, which the address bar supplies. Plain wt also works, but its folder then depends on your profile's starting directory setting.
Two useful address‑bar commands
| Type in the address bar | Result |
|---|---|
| wt -d . | Opens Windows Terminal with the default profile in the current folder |
| wt -p "Command Prompt" -d . | Opens a Command Prompt tab in the current folder, whatever your default profile is |
Quick tip: swap the profile name for any profile in your Terminal list, such as "Windows PowerShell" or a WSL distribution name.
Open a file from within Windows Terminal
When you'd do this: you are already in a project folder in Terminal and want to view a log, PDF or spreadsheet without switching to File Explorer to find it.
How it works in CMD and PowerShell: both hand the file to its associated program, the same app a double-click would open.
- In a PowerShell tab, run
Invoke-Item .\report.pdfor the short aliasii .\report.pdf. - To open every matching file, use a wildcard, for example
ii .\*.xlsx. - In a Command Prompt tab, type the file name, for example
report.pdf, and press Enter. - To open the file in a specific program from CMD, run
start "" notepad "C:\Work Files\notes.txt". - To open it in a specific program from PowerShell, run
notepad.exe .\notes.txt.
Example for PowerShell and example for CMD with a program, side by side: ii .\notes.txt uses the default app, while start "" notepad notes.txt forces Notepad. The empty "" is the window title argument that start expects before a quoted path.
Open a folder in File Explorer from Terminal
This is the reverse trip: you are in a folder in Terminal and want to see it in File Explorer, for example to drag files into an email.
start .
In Command Prompt, start sees that . is a directory and opens Explorer.exe on that path. In PowerShell, run ii . instead; Invoke-Item opens the current folder in File Explorer, which is its default action for a folder. Replace . with any path, such as start C:\Projects.
You should see: A File Explorer window opens on the same folder the prompt shows.
Drag a folder from File Explorer into Windows Terminal
Dragging works when Terminal is already open and you want another tab in a folder you can see in File Explorer.
- Arrange File Explorer and Windows Terminal side by side.
- Drag a folder from File Explorer onto the New Tab (+) button in Terminal.
- Release it to open the default profile in that folder in a new tab.
- Hold Alt while you drop to open a new pane instead, or Shift to open a new window.
Add or remove “Open in Windows Terminal” from the File Explorer context menu (advanced)
Why you might do this: you want a second entry that opens a specific profile, or the built-in entry is missing on a PC. Microsoft documents no Windows Terminal setting that hides its own entry, so the safe, reversible option is a separate per-user entry you control.
| Goal | Approach | Reversible |
|---|---|---|
| Add an entry for one user | Per-user verb under HKEY_CURRENT_USER\Software\Classes\Directory\shell | Yes, delete the key |
| Add an entry for a specific profile | Same verb with wt.exe -p "Profile name" -d "%1" | Yes, delete the key |
| Remove an entry you added | Delete its key with reg delete | Re-import your .reg backup |
| Get the built-in entry back | Install or update Windows Terminal from the Microsoft Store | Not applicable |
Safe approach: Use a .reg file (recommended)
A .reg file is reviewable before you run it and writes only to your own user hive, so it needs no admin rights. Save the text below in Notepad as open-wt-here.reg, then double-click it and select Yes.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\OpenWTHere]
@="Open Windows Terminal here"
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\OpenWTHere\command]
@="wt.exe -d \"%1\""
The first key creates a verb for folders, and its default value is the menu text. The command subkey runs wt.exe with -d set to %1, the path of the folder you right-clicked, wrapped in quotes so paths with spaces work.
You should see: Right-clicking a folder shows Open Windows Terminal here, directly or under Show more options, and it opens Terminal in that folder.
Before importing any .reg file, back up the branch with reg export "HKCU\Software\Classes\Directory\shell" shell-backup.reg.
Manual registry steps (advanced)
- Press Windows + R, type
regeditand press Enter. - Go to
HKEY_CURRENT_USER\Software\Classes\Directory. If there is no shell key under it, right-click Directory, select New > Key and name itshell. - Right-click shell, select New > Key and name it
OpenWTHere. - Double-click (Default) in the new key and enter
Open Windows Terminal hereas the menu text. - Right-click OpenWTHere, select New > Key and name it
command. - Double-click (Default) in command and enter
wt.exe -d "%1". - Close Registry Editor and right-click any folder to test the entry.
To remove the Open Windows Terminal here entry
- Open Terminal or Command Prompt as your normal user.
- Run
reg delete "HKCU\Software\Classes\Directory\shell\OpenWTHere" /f. - Right-click a folder; the custom entry is gone and the built-in Open in Terminal entry is unchanged.
Set Windows Terminal as the default terminal app in Windows 11
Windows 11 version 22H2 and later already use Windows Terminal to host console windows. If a PC was switched back to the old console, change it here.
- Open Windows Terminal and select Settings from the dropdown arrow.
- Select Startup.
- Set Default terminal application to Windows Terminal.
- Set Default profile to the shell you want Open in Terminal to start, such as Command Prompt.
- Select Save.
The same choice lives in Windows Settings > System > Advanced > Terminal.

Troubleshooting common issues
"wt" is not recognized from the address bar or Run
The Windows Terminal app execution alias is off, or the WindowsApps folder is missing from PATH.
- Open Settings and search for Manage app execution aliases.
- Turn on the alias for Windows Terminal.
- If it still fails, check that PATH contains
%LOCALAPPDATA%\Microsoft\WindowsApps.
wt commands with semicolons break in PowerShell
PowerShell treats ; as its own statement separator.
- Type a backtick character directly before each semicolon so PowerShell passes it to wt.
- Or add the stop-parsing operator after wt:
wt --% -d . ; split-pane -d ..

“Open in Terminal” missing
No Open in Terminal entry when right-clicking a folder
Windows Terminal is not installed or is damaged, or the entry is hidden in the classic menu.
- Select Show more options in the right-click menu and look again.
- Open the Microsoft Store, search for Windows Terminal and install or update it.
- Restart File Explorer, then right-click the folder again.
- As a fallback, type
wt -d .in the address bar or add the custom entry above.

Terminal opens, but the working directory is your user folder
Terminal starts in C:\Users\<name> instead of the folder
The profile's startingDirectory is set, and its default value is %USERPROFILE%.
- Launch with an explicit folder:
wt -d .from the address bar. - Or open
settings.json(hold Shift and select Settings) and set"startingDirectory": nullon the profile. - With a null value, wt.exe launched from the Explorer address bar starts in the folder you were viewing.

Permissions / “Access Denied” when performing operations from a terminal
"Access is denied" when writing to Program Files or system folders
The tab runs without administrator rights, and elevated and unelevated tabs cannot share one Terminal window.
- Right-click Terminal in the Start menu and select Run as administrator.
- Run
wt -d "C:\Program Files\MyApp"from that elevated window to jump to the folder. - To make a profile always elevated, add
"elevate": trueto that profile in settings.json.
Paths with spaces or special characters
A command fails on a path such as C:\Work Files
Unquoted spaces split the path into separate arguments.
- Wrap the path in double quotes:
cd "C:\Work Files". - In CMD, give start an empty title first:
start "" "C:\Work Files\notes.txt". - In PowerShell, use single quotes with
-LiteralPathfor names with brackets:ii -LiteralPath '.\[draft] notes.txt'. - In settings.json, escape backslashes:
C:\\Work Files.
Practical tips and recommended workflows
| Workflow | How to do it |
|---|---|
| Two shells in one project folder | wt -d . ; split-pane -d . from Command Prompt, or escape the ; in PowerShell |
| Jump to the parent folder with a key | Add a sendInput action with input cd ..\r bound to a key in settings.json |
| Duplicate the current tab's folder | Press Alt + Shift + D to open a duplicate pane |
| Open a new tab in the same window | Press Ctrl + Shift + T |
| Start a project profile in its folder | Set startingDirectory on that profile to the project path |
| Open the folder you are in, in Explorer | start . in CMD or ii . in PowerShell |
These shortcuts build on Windows Terminal tabs and panes. When File Explorer is not open, you can still open Terminal another way and then run cd to reach the folder.
Security and administrative considerations
| Consideration | Recommendation |
|---|---|
| Elevated Terminal from a folder | Open an admin window only for the task that needs it; elevated and normal tabs cannot mix in one window |
| Running scripts found in a folder | Read a script before running it from a downloaded or shared folder |
| Registry edits for context menus | Use HKEY_CURRENT_USER for per-user entries and export a backup first |
| Invoke-Item and wildcards | Check the match with Get-ChildItem first; ii .\*.xlsx opens every matching file |
| Managed PCs | Context menu and Terminal settings can be governed by policy; ask IT before changing them |
If File Explorer misbehaves after context menu changes, restart it. If it still freezes after the restart, fix File Explorer crashes next.
File Explorer and Windows Terminal FAQ
How do I open Windows Terminal in a folder in Windows 11?
Right-click the folder or an empty area inside it in File Explorer and select Open in Terminal. You can also type wt -d . in the File Explorer address bar and press Enter.
How do I open File Explorer from Command Prompt or PowerShell?
Run start . in Command Prompt or ii . in PowerShell to open the current folder in File Explorer. Replace the dot with a full path to open a different folder.
Why does Windows Terminal open in my user folder?
Each profile has a starting directory, and its default is %USERPROFILE%. Launch with wt -d . from the address bar, or set startingDirectory to null for that profile in settings.json.
How do I make Open in Terminal start Command Prompt instead of PowerShell?
Open Windows Terminal Settings, select Startup and set Default profile to Command Prompt. Open in Terminal uses the default profile, so it now opens Command Prompt.
How do I open a file from Windows Terminal?
In PowerShell, run ii followed by the file name, such as ii .\report.pdf. In Command Prompt, type the file name and press Enter. Both open the file in its associated app.
Can I open Terminal as administrator in the current folder?
Not from the standard Open in Terminal entry. Open Terminal as administrator from the Start menu, then run wt -d with the folder path, or set the profile's elevate setting to true.
Why does wt not work from the File Explorer address bar?
The Windows Terminal app execution alias is probably off. Turn it on under Manage app execution aliases in Settings, and check that %LOCALAPPDATA%\Microsoft\WindowsApps is on your PATH.
When File Explorer itself will not start, open File Explorer on Windows 11 from the keyboard, Start menu or Run box.





