Opening File Explorer directly from the Command Prompt (cmd) is one of those fundamental Windows skills that separates casual users from power users. Whether you are deep in a scripting session, troubleshooting a system issue without a working GUI, or simply prefer the speed of keyboard-driven navigation, knowing how to launch the graphical file manager from a text-based interface saves valuable time. This guide covers every native method, essential switches, and practical use cases to help you master this workflow.
The Standard Command: explorer
The most direct way to launch File Explorer from the Command Prompt is by typing the executable name: explorer or explorer.exe. Because C:\Windows is typically included in the system PATH environment variable, you do not need to provide the full path Nothing fancy..
Simply open Command Prompt (press Win + R, type cmd, hit Enter) and type:
explorer
Pressing Enter launches a new File Explorer window, usually defaulting to This PC or Quick Access, depending on your Windows version and folder options. This command works identically in PowerShell and Windows Terminal Most people skip this — try not to. Nothing fancy..
Opening Specific Folders and Paths
The real power of launching Explorer from the command line lies in the ability to pass arguments. You can target any local path, network share, or virtual namespace (like Control Panel items) instantly Still holds up..
Targeting a Local Directory
To open a specific folder, append the full path immediately after the command. If the path contains spaces, you must wrap it in double quotes Worth keeping that in mind..
explorer "C:\Users\YourName\Documents\Projects"
Opening the Current Working Directory
This is arguably the most used shortcut for developers and system administrators. If you have navigated to a directory using cd (Change Directory) and want to view it graphically, use the dot (.) notation, which represents the current directory.
explorer .
This command opens a File Explorer window pointed exactly at the folder you are currently "inside" within the terminal.
Opening the Parent Directory
Similarly, two dots (..) represent the parent directory. This allows you to jump up one level visually without typing cd .. followed by explorer . Not complicated — just consistent..
explorer ..
Opening Network Shares (UNC Paths)
You can access Server Message Block (SMB) shares directly using Universal Naming Convention (UNC) paths Which is the point..
explorer "\\ServerName\ShareName\Folder"
Essential Command-Line Switches
The explorer.In practice, exe executable accepts several switches (flags) that modify how the window opens. These are case-insensitive but are conventionally written with a forward slash (/) in Windows environments That's the part that actually makes a difference..
/root, <object>
This switch opens a window viewing the specified object as the "root" of the namespace. The navigation pane will not show anything above this level. This is useful for creating a focused, sandboxed view—often used in kiosk modes or specific administrative tasks And that's really what it comes down to. No workaround needed..
explorer /root, "C:\Windows\System32"
/select, <object>
This is a powerful troubleshooting and navigation tool. It opens File Explorer with the specified file or folder selected (highlighted) and in focus. If you provide a file path, the parent folder opens with that file highlighted.
explorer /select, "C:\Windows\System32\notepad.exe"
Use case: You find a suspicious file via dir or a script and want to immediately inspect its properties, rename it, or delete it via the GUI Nothing fancy..
/e
This switch forces the new window to open with the navigation pane (folder tree) expanded, resembling the classic "Explore" view from older Windows versions. By default, modern Windows often opens a "single-pane" view depending on settings; /e ensures the tree is visible The details matter here. Nothing fancy..
explorer /e, "C:\Data"
/n
This forces a new window to open, even if a window for that location is already open. Without this, Windows often reuses an existing Explorer window for the same path (tabbing behavior in Windows 11 or window reuse in Windows 10) That alone is useful..
explorer /n, "D:\Backup"
Combining Switches
You can combine these flags for precise control. Here's one way to look at it: to open a new window (/n), with the navigation pane expanded (/e), rooted at a specific folder (/root), you would string them together:
explorer /n, /e, /root, "C:\Projects\Alpha"
Advanced Techniques and Automation
Creating Shortcuts and Batch Files
If you frequently access a deep directory structure, create a .bat or .cmd file on your desktop.
- Open Notepad.
- Paste:
explorer /n, /e, "C:\Very\Long\Path\To\Project\Assets" - Save as
OpenProjectAssets.bat. - Double-click to launch instantly. You can even assign a keyboard shortcut to this batch file via Properties > Shortcut key.
Using Environment Variables
You don't need to hardcode usernames. apply environment variables for portable scripts Small thing, real impact..
explorer "%USERPROFILE%\Downloads"
explorer "%APPDATA%\Microsoft\Windows\Start Menu\Programs"
explorer "%WINDIR%\System32\drivers\etc"
Launching Special Folders (Shell Commands)
Windows uses CLSIDs (Class Identifiers) for special system folders (God Mode, Control Panel, Printers, etc.). You can launch these via the shell::: protocol handler That's the part that actually makes a difference..
Open "This PC" (Computer):
explorer shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
Open Control Panel (All Tasks / "God Mode"):
explorer shell:::{ED7BA470-8E54-465E-825C-99712043E01C}
Open Network Connections:
explorer shell:::{7007ACC7-3202-11D1-AAD2-00805FC1270E}
Open Recycle Bin:
explorer shell:::{645FF040-5081-101B-9F08-00AA002F954E}
These commands bypass the standard file system hierarchy and jump straight to virtual namespaces.
Opening File Explorer with Elevated Privileges (Admin)
Standard explorer commands run with the same privileges as the Command Prompt window. If you opened cmd as Administrator, explorer launches elevated. Still, Windows treats explorer.Consider this: exe uniquely: it is the shell process. There is typically only one instance of explorer.exe running per user session (hosting the taskbar, start menu, and desktop) That's the part that actually makes a difference..
This is where a lot of people lose the thread.
If you try to run explorer /n from an Admin prompt while a standard Explorer shell is running, Windows often ignores the "new window" request and simply tells the existing (non-elevated) shell process to open the folder. You cannot easily run a separate, elevated Explorer instance side-by-side with the standard shell to manage files with Admin rights in the GUI.
It sounds simple, but the gap is usually here.
Workaround for Admin File Management: Instead of trying to elevate the whole shell, use one of these methods:
- Run a specific file manager as Admin: Launch a third-party file manager (like Total Commander, Double Commander, or 7-Zip File Manager) from an Admin cmd prompt:
start "" "C:\Path\To\FileManager.exe". - Use
runasfor a specific executable:runas /user:Administrator "explorer.exe"(This often fails due to the single-instance shell design). 3