Cry How To...

Windows Explorer Command Line Flags

When executed from the command line, or from a shortcut, window explorer can take the following optional switches:

explorer.exe [/n] [,/e] [,/root,{object}] [[,/select],{sub-object}]


/n Opens a new explorer window, even if an existing one is open.
/e Opens a two pane view rather than the single pane view.
/root,{object} Makes Explorer display a window in which the "root" is the {object} specified. For example, to open explorer with the D drive as the root use:
explorer.exe /e,/root,D:\
/select,{sub-object} Specifies the drive, folder or file to receive focus. For example (under NT/W2K) to open explorer making notepad the currently selected file use:
explorer /select,C:\WinNT\notepad.exe.

If ‘/select’ is specified then the object receives focus, if the ‘/select’ is omitted then the view is of the contents of the object.


  • See also the Microsoft Knowledge Base article Q130510 which documents the public switches to explorer.
  • Commas are necessary between parameters where indicated.

These notes are believed to apply to all versions of Windows.

About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.