The direct equivalent of OS X’s open
is start
in cmd
.
start foo.txt
would launch Notepad (or whatever text editor you’re using),
start http://example.com
would launch your browser,
start \someDirectory
will launch Explorer, etc.
Care has to be taken with arguments in quotes, as start
will interpret the first quoted argument as the window title to use, so something like
start "C:\Users\Me\Folder with spaces\somedocument.docx"
will not work as intended. Instead prepend an empty quoted argument in that case:
start "" "C:\Users\Me\Folder with spaces\somedocument.docx"
Note that start
isn’t a separate program but a shell-builtin. So to invoke this from an external program you have to use something like
cmd /c start ...
The equivalent in PowerShell is either Start-Process
or Invoke-Item
. The latter is probably better suited for this task.
Invoke-Item foo.txt # launches your text editor with foo.txt
Invoke-Item . # starts Explorer in the current directory
As for the Windows API, you’re looking for ShellExecute
with the open
verb.
The direct equivalent of OS X’s open
is start
in cmd
.
start foo.txt
would launch Notepad (or whatever text editor you’re using),
start http://example.com
would launch your browser,
start \someDirectory
will launch Explorer, etc.
Care has to be taken with arguments in quotes, as start
will interpret the first quoted argument as the window title to use, so something like
start "C:\Users\Me\Folder with spaces\somedocument.docx"
will not work as intended. Instead prepend an empty quoted argument in that case:
start "" "C:\Users\Me\Folder with spaces\somedocument.docx"
Note that start
isn’t a separate program but a shell-builtin. So to invoke this from an external program you have to use something like
cmd /c start ...
The equivalent in PowerShell is either Start-Process
or Invoke-Item
. The latter is probably better suited for this task.
Invoke-Item foo.txt # launches your text editor with foo.txt
Invoke-Item . # starts Explorer in the current directory
As for the Windows API, you’re looking for ShellExecute
with the open
verb.
Say if I am navigating some folder in cmd such as E:\dir1\dir2
E:\dir1\dir2>
How can I open the folder quickly in Windows Explorer? Copying the whole path and pasting seems awkward.
There is an equivalent in Mac; an open .
will do that.
asked Jan 22, 2012 at 3:08
start .
or explorer .
will open the current directory in Windows Explorer.
answered Jan 22, 2012 at 3:20
iglvzxiglvzx
23.5k13 gold badges85 silver badges122 bronze badges
1
explorer .
will start Windows Explorer in the current directory.
answered Jan 22, 2012 at 4:56
RookRook
23.7k32 gold badges129 silver badges213 bronze badges
3
To augment the accepted answer, if you are like me and will probably never remember start .
, here is a simple batch file called explore
you can put in your Environment Path:
@echo off
echo Opening %cd%
start .
answered Aug 6, 2018 at 14:30
THE JOATMONTHE JOATMON
1,8789 gold badges49 silver badges82 bronze badges
You must log in to answer this question.
Not the answer you’re looking for? Browse other questions tagged
.
Not the answer you’re looking for? Browse other questions tagged
.
-
Home
-
News
- How to Open a File Explorer Window from CMD Win 10
By Alisa |
Last Updated
This post gives detailed instructions for how to open File Explorer from CMD (Command Prompt) without leaving the current directory. As a leading software producer, MiniTool produces free data recovery software, disk partition manager, Windows system backup and restore software, video editor/converter/downloader, and more.
If you want to open Windows File Explorer from CMD (Command Prompt) and don’t know how to do it, you can check the detailed instructions below.
How to Open a File Explorer Window from CMD’s Current Directory
Preparation:
If you still don’t how to open Command Prompt in Windows 10, you can follow the following operation to open it first. Press Window + R to open Run dialog, type cmd, and press Enter to open CMD. If you want to open elevated Command Prompt, you can press Ctrl + Shift + Enter after typing cmd in Run.
You can also press Windows + X and select Command Prompt to open it. If you see PowerShell but not Command Prompt after pressing Windows + X, you can put Command Prompt back on the Windows + X Power Users menu.
Related: [Fixed] Command Prompt (CMD) Not Working/Opening Windows 10?
Check below how to open a file explorer window from Command Prompt’s current directory.
1. To open File Explorer application, you can simply type explorer command and press Enter to start explorer.exe from Command Prompt.
2. To open the current folder/directory File Explorer window, you can type start . command in Command Prompt window and press Enter.
3. To open the parent directory of the current folder, you can type start .. command, and press Enter.
4. If you want to open another folder in the parent directory without leaving the current folder in Command Prompt, you can type start ..\<folder name>, and press Enter. Replace the ‘folder name’ with the exact name of the target folder.
5. You can also type the full path to open any File Explorer folder from current directory in CMD on your Windows 10 computer, for instance, you can type the command start c:\windows\system32 to open the System32 folder under Windows directory.
6. You can also use the Windows built-in environmental variables or the new shell: operator styles command to open file explorer from CMD without leaving the current folder. For example, you can type start %AppData% command and press Enter to open the user’s AppData folder. Or you can type start shell:startup to open Windows startup folder.
7. To check all the functions and switches of the start command, you can type start /? command in Command Prompt window. You will get a full list of the switches of start command and the functions of those switches.
Bottom Line
If you want to open a File Explorer window from CMD on Windows 10 without leaving the current directory, you can follow the instructions above to do it.
FYI, if you happen to lose some data on your Windows 10 computer or other storage devices, you can use the best data recovery software like MiniTool Power Data Recovery to easily recover lost data.
MiniTool Power Data Recovery is a top free data recovery software for Windows 10. It allows you to easily recover any deleted/lost files from Windows 10 computer, external hard drive HDD or SSD, USB drive, SD card, memory card, and more.
This tool is 100% clean and safe. You can just connect your device, open MiniTool Power Data Recovery and select your device, then click Scan button. After the scan finishes, you can preview, select and save the recovered files to a safe location.
About The Author
Position: Columnist
Alisa is a professional English editor with 4-year experience. She loves writing and focuses on sharing detailed solutions and thoughts for computer problems, data recovery & backup, digital gadgets, tech news, etc. Through her articles, users can always easily get related problems solved and find what they want. In spare time, she likes basketball, badminton, tennis, cycling, running, and singing. She is very funny and energetic in life, and always brings friends lots of laughs.
Doing some work in Command Prompt and want to open File Explorer? You can do so straight from Command Prompt. Here’s how.
Quick Links
- Open File Explorer Using Command Prompt
- Open a Specific Folder in File Explorer Using Command Prompt
Key Takeaways
Run «start .» in a Command Prompt window to open File Explorer to the current directory. Alternatively, run «start (folder)» to open File Explorer to a specific folder.
While there are quicker ways to open File Explorer, such as using a keyboard shortcut, you can use Command Prompt to open the file manager in the current directory (or any other directory) in Windows 10. Here’s how.
Open File Explorer Using Command Prompt
First, open Command Prompt on your PC by opening the «Start» menu, typing «cmd» in the Windows Search bar, then selecting «Command Prompt» from the search results.
Command Prompt will now open. Here, run the following command to open the File Explorer:
start .
The .
in the command represents the current directory in the command prompt. This command will open the folder in File Explorer that reflects that directory.
To open the parent folder of the current directory, run this command instead:
start ..
The parent folder of the current directory will now open in the File Explorer.
You can keep going back in the directory by appending a backslash and two periods. For example, we’re currently in the «25_September 2020» folder in Command Prompt. Running start ..\..
will open the «Documents» folder in File Explorer—a folder two levels up from the current directory in Command Prompt.
Open a Specific Folder in File Explorer Using Command Prompt
You can change directories in Command Prompt by using the cd
command and running the start .
command once in the desired directory to open that folder in File Explorer. However, you can also open any folder in File Explorer by running the start
command, followed by the path of the folder you’d like to open.
For example, in our current directory, C:\Users\marsh
, we want to open the Documents
folder in File Explorer, which is just one level down. To do so, we’d run the following command:
start Documents
In the same directory, let’s say we want to open our Invoices
folder, which is located inside the Documents
folder. We’d run this command:
start Documents\Invoices
The «Invoices» folder will now open in File Explorer.