Command Line Pointers for Windows Explorer

Here are some pointers on how to use Windows Explorer, in Microsoft Windows XP Professional from the Command Line.

To have C: open (No folders)

%SystemRoot%\Explorer.exe /root, C:\

To have My Computer

C:\WINDOWS\explorer.exe /n

To have C: open expanded - Examples

%windir%\EXPLORER.EXE /e,c: %windir%\EXPLORER.EXE /e,f:\Limited Documents

To have C: open and My Documents

    %windir%\EXPLORER.EXE /e,c:,%HOMEDRIVE%%HOMEPATH%\My Documents

For it to open to My Documents:

explorer /n,/e,%HOMEDRIVE%%HOMEPATH%\My Documents or C:\WINDOWS\explorer.exe /n,/e,%HOMEDRIVE%%HOMEPATH%\My Documents

To have My Documents open only (No folders)

Explorer /root, c:\Documents and Settings\%username%\My Documents Explorer /root, c:,%HOMEDRIVE%%HOMEPATH%\Kelly's Computer

If you wish to have Explorer open at My Documents on another drive, you would use:

%SystemRoot%\explorer.exe /e, f:\My Documents

To have another Drive letter assigned to opening: D for example

C:\Windows\Explorer.exe /e, d:\

d:\ can be modified for any folder/sub-folder you like. As in:

%SystemRoot%\Explorer.exe /e,d:\My Stuff

The /e switch tells Windows Explorer to open in the two pane explorer mode and the c:\ tells it to open in folder C:\. If you omit the /e switch, Windows Explorer opens in a single pane view.

References and Other Links:

Original Microsoft Support Newsgroup Post

Command-Line Switches for Windows Explorer

Command Line Switches Examples for Windows Explorer http://www.kellys-korner-xp.com/xp_c.htm#comline

Explorer.exe Command-Line Options for Windows XP  

Customize the Windows Explorer Views in Windows XP  

Have Windows Explorer Default to the %SystemRoot% Drive When Started: http://support.microsoft.com/?kbid=257518 

HOW TO: Customize the Windows Explorer Views in Windows XP

This article is part of the GWB Archives. Original Author: Murray Gordon

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.