Launching a Windows Terminal to a Specific Folder
Posted: January 1, 2024 | | Categories: Microsoft Windows
In Windows Path Items Not Available in Visual Studio Code I mentioned opening a command prompt or terminal window from Windows File Explorer but didn't explain what I meant. Years ago I learned an interesting trick for opening a Windows command prompt to a specific folder; there are two ways, but I don't think many people know about the second one. This article describes both options.
Right-Click
I think most people know about this one, but sharing just in case you don't. To open a command prompt/terminal window to a specific folder:
- Open Windows File Explorer
- Navigate to the parent folder of the target folder (the folder you want to open a terminal window into)
- Hold down the Shift key and hover the mouse over the target folder
- Right-click on the folder and select Open in Terminal as shown in the following figure
At this point, File Explorer opens the command prompt/terminal window to the scope of the selected folder as expected.
Command Approach
Another method for opening a terminal window to a particular folder, is to type the executable name for the terminal window (cmd
) into the address bar in Windows File Explorer. Here's how to do it:
- Open Windows File Explorer.
- Navigate to the target folder (the folder you want to open a terminal window into).
- In the folder location input field highlighted in the following figure type
cmd
and press enter.
Selecting the folder input field:
Entering the command into the folder location input field:
At this point, File Explorer opens the terminal window to the scope of the selected folder as expected.
Note: If you have the Windows Terminal App installed, which is different from the default command prompt application, you can also type wt
instead of cmd
to open the Windows Terminal app. With the Windows Terminal app installed either command opens the app.
I hope this helps you use Windows more efficiently.
Next Post: Leaked Credentials from Google Cloud Project
Previous Post: End of the Year Wrap-up (2023)
If this content helps you in some way, please consider buying me a coffee.