Tip of the day: Get to the root of an Explorer window

Normally, when you open Windows Explorer, the window opens in your My Documents folder, with all other drives and folders visible in the Folders pane on the left. But if you just want to work with the files in a single folder (with all its subfolders), don’t forget the trick of creating a “rooted” Explorer window that contains only the specified folder and its subfolders. The secret is using the right switches after the explorer.exe command – in this case, /e to open an Exporer window (with folders visible) and /root to restrict the display of folders to only those that are below the folder you specify.

This shortcut, for instance:

%windir%\explorer.exe /e,/root,%userprofile%\My Documents\

shows a “rooted” view of the current user’s My Documents folder.

Try this one to open the Shared Documents folder:

%windir%\explorer.exe /e,/root,%allusersprofile%\Documents

Note in all cases that there is a space after the explorer.exe command but no space between switches and parameters.

Both of these shortcuts take advantage of environment variables. These systemwide shortcuts, identified by the percent signs on either side of the variable name, automatically point to the correct location, based on the current user profile. If you create one of these shortcuts and put it in the Desktop folder in the All Users profile, the shortcut will appear on the desktop of any user and will open properly for each logged-on user, without requiring any customization.

5 thoughts on “Tip of the day: Get to the root of an Explorer window

  1. Thanks Ed! I rely on Explorer (and ExplorerPlus) throughout the entire day and being able to create shortcuts in this way makes navigation efficient. Does anyone realize how much time is wasted in a day, month, year on the job having to click an extra three times every time you enter Explorer? If you do it ten times a day, you may not notice, but if you do it 110 times a day, it adds up and the right index finger gets tired.

  2. I do this another way. Navigate in Windows Explorer to the folder you want a shortcut to. Make sure the Windows Explorer window is not maximized. Right click and drag the folder to the desktop. Then select “Create shortcuts here”.

    No switches or variables to deal with.

  3. Michael, your technique is quick, but it creates a regular Explorer window in which the folder pane contains all drives and folders on your system. This tip is about restricting the scope of the Explorer window so you see only a subset of folders. Try your way and then try mine and you’ll see the difference!

  4. Pingback: shahine.com/omar/

Comments are closed.