File Explorer is the default file management application which comes bundled with every modern version of Windows. It allows the user to perform all basic file operations like copy, move, delete, rename and so on. It supports a number of command line arguments (switches) which can be useful in various scenarios. It’s good to know them.
You can use File Explorer command line arguments in shortcuts, in batch files, in VB scripts or from PowerShell. In Windows 10, the application supports the following command line arguments.
Before you proceed: You can test these arguments by opening the Run box (Win + R) or a command prompt instance. There you can type the commands described below.
explorer.exe /n,folder_path
The switch «/n» makes File Explorer open a new window with the specified location selected in the navigation pane. If you omit the folder path, Windows 10 opens the Documents folder with This PC selected on the left or Quick Access. In very old Windows versions like XP, this switch made Explorer open a new window without the folder tree on the left. In Windows 10, 8, 7, it does not hide the left area.
explorer.exe /e,folder_path
The /e switch opens Windows Explorer expanded to the specified folder. In very old Windows versions like XP, this switch made Explorer open a new window with the folder tree on the left expanded to the specified folder. In Windows 10, it has exactly the same behavior as the «/n» switch mentioned above unless you enable the option «Expand to current folder».
explorer.exe /root,folder_path
Opens File Explorer with the specified folder as the root (topmost item in the breadcrumbs bar). For example, to open the folder «C:\apps\firefox beta», I need to execute the following command:
explorer.exe /root,"C:\apps\firefox beta"
When a folder is opened as root, Alt + Up no longer works to go up one level.
The specified location will appear as a separate item in the navigation pane on the left.
explorer.exe /select,file_or_folder_path
This switch tells File Explorer to open with the specified file or folder selected in file view (right pane). For example, to open the folder «C:\apps\firefox beta» with firefox.exe selected, I need to execute the following command:
explorer.exe /select,"C:\apps\firefox beta\firefox.exe"
The result will be as follows:
explorer.exe /separate
The explorer.exe application supports a secret hidden command line switch /separate. When specified, it forces Explorer to run in a separate process. This will open a new Explorer window directly in a separate process.
To check how many instances of Explorer you have running in a separate process, open Task Manager and go to the Details tab.
I covered this switch in detail in the following article: How to start File Explorer in a separate process in Windows 10.
That’s it. Feel free to leave a comment if you have a question or know more command line tricks with File Explorer.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!
- SS64
- CMD
- How-to
Command-line switches that you can use to open the GUI Windows Explorer (Explorer.exe).
Syntax Explorer.exe options Options /n Open a new single-pane window for the default selection. This is usually the root of the drive Windows is installed on. If the window is already open, a duplicate opens. /e Open Windows Explorer in its default view. This is usually the users home drive. (,)/root,object Open the specified object in a window view. /select,object Open a window view with the specified folder, file or application selected. /separate Launch an explorer instance as a separate process (undocumented option).
Quotation marks are required if the File/Folder object contains spaces or symbols.
If /e or /n are followed by a comma and folder path then explorer will open and display the folder, the /e or /n have no effect, this provides backwards compatibility with older versions of Windows. If the object is given as a filename rather than a folder, the file will be opened using the default application, like START.
Explorer.exe is normally found in the Windows folder, typically C:\Windows\Explorer.exe
Current versions of Windows no longer allow the use of variables such as %username% in a shortcut target executable, but you can pass a variable as a parameter to Explorer.exe making it possible to build shortcuts which open explorer at a given path. A kind of poor mans folder redirection.
Windows File Explorer search box
Windows File explorer supports Advanced Query Syntax (AQS) to help define precise searches.
Microsoft document this as an ‘obsolete technology’ but it is still present and mostly working in the current Windows Search. Searches work for filenames and properties but not reliably for file contents, use a third party tool for that.
In Windows 11 you will need to Enable ClassicSearch with some registry mods.
File kind to search AQS Keyword Example All file kinds everything kind:everything Author author or by author:»Gabrielle Zavin» Company company company:Microsoft Date date date:today
date:tomorrow
date:yesterday
date:this week
date:last week
date:next month
date:past month
date:coming yearDate modified datemodified or modified modified:last week Deleted deleted or isdeleted isdeleted:true Documents docs kind:docs Favorites favorites kind:favorites File extension ext or fileext ext:.txt File name or foldername Filename or name filename:MyResume
filename:*ResumeFile name or foldername (exact match) Filename or name filename:=MyResume Files within a specific folder or any subfolders folder, under or path folder:downloads
folder:»Public\Public Desktop»Files within a specific folder name foldername or in foldername:mydocs or in:mydocs Folders folders kind:folders Music music kind:music Pictures pics kind:pics Presentations presentations kind:presentations Programs programs kind:programs Size size size:> 5m Spreadsheets spreadsheets kind:spreadsheets Status status status:complete Text documents text kind:text Title title, subject or about title:»Quarterly Financial» Videos videos kind:videos There are additional keywords available but many will only work for specific document types (e.g. datelastprinted: lastsavedby).
You can combine search keywords and file properties with the following operators to broaden or narrow a search.
Operator Example Result NOT social NOT security Finds items that contain social, but not security. Space social security Finds items that contain social and security. OR social OR security Finds items that contain social or security. Quotation marks «social security» Finds items that contain the exact phrase social security.
Use quotes to match «long filenames».Parentheses (social security) Finds items that contain social and security in any order. > date:>11/13/2023
size:>500Finds items newer than a given date (use the locale’s date format).
Finds items with a size greater than 500 bytes.< date:<11/13/2023
size:<50kFinds items older than a given date (use the locale’s date format).
Finds items with a size less than 50 Kbytes... date:11/13/21..11/15/21 Finds items with a modified date between the given range (use the locale’s date format). The operators NOT and OR must be in uppercase and can’t be combined in the same query.
Examples
Open a Windows Explorer window at the current directory:
C:\some folder\> Explorer .
Open an Explorer window with the ‘C:\Demo’ folder displayed:
Explorer.exe «C:\Demo»
Open an Explorer window with the ‘examples’ folder displayed and its parent hidden:
Explorer.exe /root,»C:\Demo\examples»
Open a webpage in Microsoft Edge:
%windir%\explorer.exe microsoft-edge:https://ss64.com
Open an Explorer window with SS64App selected:
Explorer.exe /select,»C:\Demo\SS64App.exe»
Open an Explorer window with C: expanded and SS64App selected:
Explorer.exe /e,/root,»C:\Demo\SS64App.exe»
Open an Explorer window with the share \\server64\FileShare1 :
Explorer.exe /root,»\\server64\FileShare1″
Open an Explorer window with TestApp.exe selected in the share\\server64\FileShare1 :
Explorer.exe /root,\\server64\FileShare1,select,SS64App.exe
Open an Explorer window at the root of the system drive C:\
Explorer \
Open an Explorer window at ‘My Documents’:
Explorer \\
or
Explorer /
Open an Explorer window at ‘The Computer’:
Explorer ‘,’
“From the growth of the Internet through to the mapping of the human genome and our understanding of the human brain, the more we understand, the more there seems to be for us to explore” ~ Martin Rees
Related commands
Shell: folder — Shortcuts to key folders.
CMD — Start a new CMD shell.
RUN Start ➞ RUN commands.
START — Start a program, command or batch file.
ProfileFolders — Location of user profile folders.
Q152457 — Windows Explorer Command-Line Options.
macOS — Similar search options are provided in macOS Finder but with a graphical interface.
Copyright © 1999-2025 SS64.com
Some rights reserved
To open Windows Explorer from the Command Prompt, simply use the following command:
explorer.exe
What is CMD?
CMD, or Command Prompt, is a command-line interface in Windows operating systems that allows users to execute commands and run scripts to manipulate files and systems. Understanding CMD is crucial for effective file management, especially for those who prefer efficiency over graphical interfaces. CMD provides users with a powerful way to navigate their systems using commands instead of clicks.
Open Files in Cmd: A Simple Guide for Quick Access
Why Open Explorer through CMD?
Opening Explorer through CMD offers numerous benefits, making it a compelling option for users who value productivity:
- Quick Access to Directories: Instead of navigating through folders with multiple clicks, a simple command can take you straight to the desired directory.
- Bypassing GUI Limitations: CMD provides an alternative way to access system features that might not be as straightforward in the GUI.
- Enhanced Productivity: For users comfortable with the command-line interface, CMD commands can significantly speed up file navigation and management tasks.
Open Services in Cmd: A Quick Guide to Command Mastery
Basic Command to Open Explorer
The most fundamental command to invoke Explorer from CMD is:
explorer .
This command opens the current directory (denoted by the dot `.`) in Windows File Explorer. It is a straightforward way to visually navigate your current command-line location.
Opening a Specific Directory
If you want to open a different folder directly, you can specify the path. For example:
explorer C:\Path\To\Your\Folder
In this command, replace `C:\Path\To\Your\Folder` with the exact path of the folder you wish to open. This way, you can instantly jump into any directory without needing to navigate through multiple layers in the GUI.
Using Environment Variables to Open Common Locations
Environment variables can be particularly useful in CMD as they point to common system directories. For instance, to open your user profile directory, you can use:
explorer %USERPROFILE%
This command uses the `%USERPROFILE%` variable to navigate directly to your home directory. Environment variables can save time and allow for quick access to commonly used locations without needing to remember full paths.
Opening Recent Files or Folders
To quickly access your recent files or folders, you can run:
explorer shell:recent
This command opens the ‘Recent Items’ folder in Windows, where you can find files and folders you have accessed recently. It’s a handy way to quickly retrieve recently used materials.
Restart Explorer Exe Cmd: A Quick Command Guide
Advanced Techniques
Opening Multiple Windows
You can also open multiple instances of Explorer simultaneously. To do this, use the `start` command:
start explorer C:\Path\To\Folder
start explorer D:\AnotherPath\Folder
Each command will launch a new instance of Explorer for the specified folder. This allows you to have several directories open at once without cluttering your workspace.
Creating Shortcuts
To streamline workflows, consider creating batch files that you can execute with a double-click. Here’s an example of a simple batch file that opens a frequently accessed folder:
@echo off
explorer C:\FrequentlyUsedFolder
pause
Save this script as a `.bat` file. When executed, it will open the designated folder immediately, saving you time in the long run.
Stop Spooler Cmd: A Quick Guide to Spooler Control
Troubleshooting Common Issues
Permission Denied
Sometimes, you may encounter a «Permission Denied» error when executing commands. This often arises due to insufficient permissions. Ensure your user account has the necessary rights, or try running CMD as an administrator, which often resolves these issues.
Incorrect Paths
If a command fails, verify that the path provided is correct. You can use the `dir` command to list the contents of a directory to ensure you’re referencing valid paths.
CMD Not Recognized
If commands such as `explorer` are not recognized in CMD, check if the command prompt is functioning correctly and ensure that system paths are appropriately set. You may need to verify your system environment variables.
Mastering Export Cmd Commands for Quick Data Management
Tips for Enhancing Your CMD Experience
To enhance your CMD navigation, consider using AutoComplete. Pressing the `Tab` key while typing allows you to auto-complete file and directory names, saving you from typing long path names entirely. This can greatly speed up your workflow.
Additionally, combining CMD with keyboard shortcuts can provide a more efficient navigation experience throughout Windows.
Master Cmd Explorer.Exe: Quick Tips and Tricks
Conclusion
Mastering how to open Explorer in CMD can drastically improve your productivity and simplify file management tasks. By leveraging the power of CMD, users can become more efficient and comfortable in their computing environments.
Change Color in Cmd: A Quick Guide to Customizing Your Shell
Call to Action
Feel encouraged to share your experiences with CMD! Practice the commands outlined here and explore more tutorials for an in-depth understanding of CMD capabilities.
Password in Cmd: Quick Commands to Manage Your Passwords
Additional Resources
For more information and advanced CMD commands, consider checking out additional resources or tutorial posts aimed at enhancing your command-line skills.
File Explorer is the standard document manager tool in Windows, delivering a visual interface that enables the document structures. While operating in a Command prompt (CMD) or Ps, you may have to access the ongoing envelope in Windows Explorer to resume. Although there are speedier ways to access File Explorer, such as using a shortcut key, users may use Command Prompt to open the document chief inside the continuing database.
Use Command Prompt To Open File Explorer
First and foremost, open Command Prompt (CMD) on your PC by opening the “begin” menu, creating “cmd” in the Windows Search bar, then, at that point, picking “Command Prompt” from the question things. Request Prompt will open. Here, run the following request to open the File Explorer:
You can change indexes in Command Prompt by utilizing the compact disc order and running the beginning. Order once in the ideal catalog to open that organizer in File Explorer. Nonetheless, you can likewise open any organizer in File Explorer by running the beginning order, trailed by the envelope you might want to open.
Open File Explorer From CMD
Utilize the command to open the ongoing envelope in the File Explorer from the CMD
C:\> explorer
To indicate the way for an envelope to open in the File Explorer, execute:
C:\> explorer 'C:\Program Files'
You can likewise utilize the wayfarer order to open records or URLs in the client’s favored applications, for instance:
C:\> explorer photo.jpg C:\> explorer doc.pdf C:\> explorer https://www.example.com/
You can likewise run the traveler (or explorer.exe) order from the Task Manager or discourse box to open another example of File Explorer. Open an order brief, type adventurer, and press Enter. It will then open another File Explorer window.
By Using Explorer Command
Open the Command Prompt window, type explorer, and hit Enter. It will open File Explorer to Quick Access or This PC relying upon your Folder Options setting. Write the following sequence to launch File Explorer in a different folder. If the enclosure method has gaps, make sure it is enclosed in two sentences.
Run Command to Open a Particular Folder
In Command Prompt, you might switch lists utilizing the disc succession and running the underlying stages. Once in the best record, ask once to send off that coordinator in File Explorer. In any case, you might open any envelope in File Explorer by executing the beginning request, trailed by the coordinator you need to open. In our proceeding with a list, C: Usersmarsh, for instance, we really want to open the Documents coordinator in File Explorer, which is just a single step down. To achieve this, we’d execute the accompanying order:
start Documents
Follow the steps outlined below to start a File Explorer panel from CMD on Pc windows before exiting the index.
Other useful articles:
- Basic Windows CMD commands
- Cool CMD Commands Tips and Tricks
- Best CMD Commands for Hacking
- CMD Commands for Wireless Network Speed
- Useful Keyboard Shortcuts for CMD
- What Info about My Laptop Can I Check with CMD and How?
- Getting Started with CMD Windows
- TOP-12 Command-Line Interview Questions (Basic)
- Command-Line Interview Questions (Advanced)
- CMD Commands to Repair Windows
- CMD Commands to Speed Up Computer
- CMD Commands for MAC OS
- How Does the Command Line Work?
- MS-Dos Interview Questions in 2021
- Windows OS Versions and History
- Recent Windows Versions Compared
- Basic Windows Prompt Commands for Every Day
- Windows Command Line Cheat Sheet For Everyone
- Windows Command Line Restart
- Windows Command Line for Loop
- Windows Command — Change Directory
- Windows Command — Delete Directory
- Windows Command Line – Set Environment Variable
- How Do I Run Command Line
- Windows Command Line Create File
- Windows Command Line Editor
- CMD Commands for Network
- CMD Commands to Look Like a Hacker
- CMD in Microsoft SQL Server
- SQLCMD Utility
- Open File Explorer with CMD
File Explorer, is a default file manager application in Windows that provides a graphical user interface for accessing the file systems.
While working in a Windows command prompt (CMD) or PowerShell, sometimes you may want to open the current folder in the File Explorer to continue working from there.
This note shows how to open the File Explorer from the CMD or Windows PowerShell using the explorer
command.
Cool Tip: How to open CMD or PowerShell in a folder from File Explorer! Read more →
Use the following command to open the current folder in the File Explorer from the CMD or Windows PowerShell:
C:\> explorer .
To specify the path to a folder to open in the File Explorer, execute:
C:\> explorer 'C:\Program Files'
You can also use the explorer
command to open files or URLs in the user’s preferred applications, for example:
C:\> explorer photo.jpg C:\> explorer doc.pdf C:\> explorer https://www.shellhacks.com
Cool Tip: How to split screen in Windows using keyboard shortcuts! Read more →
Was it useful? Share this post with the world!