Computer Education
tips blog WinXP Internet General Downloads Vista/7 Home

Windows XP Your Way- Useful Shortcuts and Commands for Windows Explorer
With appropriate command line switches, shortcuts can be created to open Windows Explorer in a variety of starting folders and formats. Some useful examples are given here.

;
On a previous page, I discussed the mechanics of how to create new shortcuts. Here, I will give some specific examples of shortcuts that make using Windows Explorer more efficient. With appropriate command line switches, shortcuts can be created to open Windows Explorer in a variety of starting folders and formats. The default for Windows XP is to open with My Documents at the top and expanded in the right pane. I personally prefer to have either My computer or the C: drive to be expanded. Whatever your preference, here are the commands to achieve it. The syntax for a Windows Explorer command is:

EXPLORER.EXE [/n][/e][,/root,<object>][[,/select],<sub object>]
Note that the syntax must be exact; misplace a space or comma and it won't work. The commas are easy to overlook when combining several switches. This somewhat fearsome looking expression will be clearer with some explanation and examples. The table below explains the purpose of the different switches.
Role of different switches and their parts
Purpose Switch Result
Determine which view style is used /n Single-pane My Computer style view
/e Double-pane Explorer view
Specify and expand a specific drive or folder /e,<object> Opens two-pane view with the drive or folder given by <object> expanded in both the right and left panes. The left pane has Desktop as the root
Determine the top level or root of the display /root,<object> Starts the view at a given drive or folder specified by <object>. Expands <object> in the right-pane if the "/e" switch is used to give two-pane view.
Specify the drive or folder that is to be the focus /select,<sub object> Opens parent of <subobject> and highlights <subobject> . If "/e" switch is also used, the left-pane view will have "Desktop" as the root and the right-pane will have expanded view of parent with <subobject> highlighted.

The large number of possible switch combinations can become bewildering. The next table lists the commands for some specific useful examples with an explanation of what they do. We will concentrate on two-pane views. The X: drive is used throughout to stand for any drive. Folders and subfolders can also be used in commands.

Examples of useful ways to open Windows Explorer
Contents of left pane Contents of right pane Command
Whole computer with Desktop as top level. Home Drive (usually C:) is expanded Home Drive (usually C:) expanded EXPLORER.EXE /e
Whole computer with Desktop as top level . X: drive is expanded. X: drive expanded EXPLORER.EXE /e,X:
Whole computer with Desktop as top level. X: \MyFolder is expanded. X:\MyFolder expanded EXPLORER.EXE /e,X:\MyFolder
Whole computer with Desktop as top level. My Computer is expanded Same as My Computer but with X: drive highlighted. EXPLORER.EXE /e,/select,X:
X: drive is top level and is expanded. Rest of the computer is not listed. X: drive expanded EXPLORER.EXE /e,/root,X:
X:\MyFolder is top level folder and is expanded. Rest of the computer is not listed. X:\MyFolder expanded EXPLORER.EXE /e,/root,X:\MyFolder

The best way to use these suggestions may be to copy the command of interest and paste it into the shortcut window shown below. Be sure to edit and replace X: or MyFolder with the appropriate value for your computer. Do not be concerned if your system tacks the environment variable %windir% onto the front of the command.

Dialog box for creating shortcuts
 

 < Previous shortcut page ©2002-2010 Victor Laurie    Home page >>