Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

---------------------------------------------------------------

Command Line switches for Windows Explorer

explorer [/n] [/e][,/root,object][[,/select],subobject]

None Explorer rooted at the Desktop


/n Opens a new window.
/e Explorer View (default if nothing else is on the command line.)
/root,object Starts Explorer with object the top item (normally Desktop is the top
item). Eg: explorer /e,/root,c:\Starts Explorer with the C drive as the only drive
available.
/select,subobject Selects the specified subobject.

Replaceable parameters are %1 (one) which is the short file or folder name and %l
(L) which is the long file name.

/IDLIST
This is an additional parameter that means a Windows internal structure is being
passed. eg:

Explorer.exe /e,/idlist,%I
The %I is a replacable parameter representing an IDLIST.

Rooted Views
To open an explorer item that starts with a special folder as the top folder use
the following syntax.

Where the special folder is a sub folder of the desktop

explorer /e,root,::{CLSID of special folder}

Where the special folder is a sub folder of another special folder (usually, if
not always My Computer)

explorer /e,root,::{CLSID of parent}/::{CLSID of special folder}

Where the special folder is part of the file system

explorer /e,root,path to folder

See Namespaces on the Icons Page for a list of CLSIDs for special folders.

Examples
Note that /select is inconsistent. Sometime the / is required, sometimes it should
be left out, and sometimes it doesn't matter.

Starts explorer with the Windows folder opened and selected.

explorer /e,select,c:\windows
Starts explorer with Windows the top level folder and command opened and selected.

explorer /e,/root,c:\windows,select,c:\windows\command
Starts explorer with Windows the top level folder and Tips.txt showing instead of
the file listing.

explorer /e,/root,c:\windows,select,c:\windows\tips.txt
Starts explorer with My Computer the top level folder and all branches except for
drives collapsed.

explorer /e,/root,::{20d04fe0-3aea-1069-a2d8-08002b30309d}
Starts explorer with C:\ the top level folder.

explorer /e,/root,c:\
Starts the Dial Up Networking folder in folder view.

explorer.exe ::{20d04fe0-3aea-1069-a2d8-08002b30309d}\::{992cffa0-f557-101a-88ec-
00dd010ccc48}

You might also like