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.
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.
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".
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.
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 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.
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!