Windows

How do I tweak Windows Explorer to open in a directory of my choosing?

Mark Kaelin shows you one tweak he uses all the time to help him get where he is going inside Microsoft Windows XP.

In information technology and operating system terms, Microsoft Windows XP has been around a very long time. Over the years, TechRepublic has literally written thousands of tips, tweaks, tricks, and hacks in our article, download, and blog pages. One of my favorites is a quick and easy tweak that will change the behavior of Windows Explorer.

The directory/folder metaphor employed by Windows XP to organize files on a hard drive fits well with my natural tendency of hierarchical organization. My thinking pattern follows the general > less general > specific > most specific framework. So there are times when I want to see a particular folder hierarchy laid out before me in Windows Explorer.

This blog post is also available in PDF format in a TechRepublic download. This blog post was originally published on December 3, 2008, but several members have been asking for the information so I am reprising it.

Tweak the displayed folder

The default display for Windows XP Explorer is to show the My Documents folder with all of its subfolders expanded and ready to be selected (Figure A).

Figure A

The default Windows XP Explorer view

There is nothing wrong with this view, but I don't always want to open Windows Explorer in the My Documents folder. I have access to, and the need to use, several different network folders during the course of a day. With a small tweak of the Windows Explorer Properties settings you can change which folder gets displayed and how that display is revealed.

To get to the Windows Explorer Properties dialog box, right-click the Windows Explorer shortcut. You can copy the shortcut in the Start Menu to your Desktop to make it easier to work with. I like to have several Windows Explorer shortcuts in my toolbar for easy access -- each going to a different place.

When you right-click and go to Properties and click the Shortcut tab, you should see a screen similar to Figure B.

Figure B

The Windows Explorer Properties dialog box

The key box is the Target box. To change the Windows Explorer shortcut to open a specific folder of your choosing, change the Target box to read:

c:\windows\EXPLORER.EXE /n, /e, X:\Folder of my choosing

For example, the blog posts I write or edit are saved on a network drive (U) in a folder I have dubbed "Working Folder." The Target box for this shortcut looks like this and the corresponding screenshot is shown in Figure C.

c:\windows\EXPLORER.EXE /n, /e, u:\working folder

Figure C

A new target folder
Now, when I click this Windows Explorer shortcut, I get the screen shown in Figure D.

Figure D

My working folder

Additional tweak

The tweak above shows my Working Folder and all the subfolders under it. But with a small additional tweak, I can get a Windows Explorer view that shows the Working Folder subfolders collapsed (Figure E).

Figure E

Working Folder with subfolders collapsed

This is a cleaner more concise look. To get this behavior, add the /select command to the Target box like this:

c:\windows\EXPLORER.EXE /n, /e, /select, u:\working folder

Your choice

You can apply this tweak to as many folders as you want. You can give them different icons and place them on your desktop or on your toolbar. This small tweak gives you great flexibility in how you interact with Windows XP.

Someone asked

In the attached discussion thread, there was a request for an explanation of the Windows Explorer in-line commands. I found a reference on Microsoft's Help and Support pages:

  • /n: Opens a new window in single-paned (My Computer) view for each item selected, even if the new window duplicates a window that is already open.
  • /e: Uses Windows Explorer view. Windows Explorer view is most similar to File Manager in Windows version 3.x. Note that the default view is Open view.
  • /root: Specifies the root level of the specified view. The default is to use the normal namespace root (the desktop). Whatever is specified is the root for the display.
  • /select: Specifies the folder to receive the initial focus. If /select is used, the parent folder is opened and the specified object is selected.

Stay on top of the latest XP tips and tricks with TechRepublic's Windows XP newsletter, delivered every Thursday. Automatically sign up today!

About

Mark Kaelin is a CBS Interactive Senior Editor for TechRepublic. He is the host for the Microsoft Windows and Office blog, the Google in the Enterprise blog, the Five Apps blog and the Big Data Analytics blog.

132 comments
saved2serve
saved2serve

Windows Technical Preview  Build 10041   changes the Windows key and e shortcut (c:\windows\EXPLORER.EXE) to show the Quick Access window rather than Windows Explorer/My PC (now also called "File Explorer).  I do not think that was a good move. 

Which brought me here. Your commands only open to  My Documents. Any way to get Windows key and e to open to My PC again?  

Thanks

djthomas
djthomas

Does this work for Windows 7?

vickywww
vickywww

try dsl-speed, a professional tool that will online optimize and speed up your DSL(e.g.,ADSL,G.lite,IDSL,SDSL)connection

ndosalak
ndosalak

since my PC got virus (now was clean) I can't open(with doubleclick) Removable Disk from "My Computer" folder. How to fix it?

wongeun18
wongeun18

I like short cut for opening the window explorer, Your Tip can't not work when I use (window key+ E)key. How can I solve this problem.

total17
total17

Great article and very helpful. Thanks

Will_B
Will_B

I admit I didn't ready the blog comments. However, I have XP installed, and do this approach all the time. Just set the taget to the Folder you wish to open. Therefore Taget = "N:\DevSupp\Appworx" When you double click on the explorer icon, it opens to that directroy.

DLWilson
DLWilson

I Love this one. I have been so tired of worming my way through directories and files to get where I want to be. I now have the means of going directly 90% of the time. And you know what, it even works on VISTA. I do have one of those things in the house (2 XP's & 1 VISTA). So thanks for this tweak it has been really helpful. DLWilson

scotty37
scotty37

Sorry if this was mentioned above as I haven't read everyone's responses. Wouldn't it be easier to right click on any folder or file of choice and select "send to" "desktop (create shortcut)" ? Ok I know that wont show the file tree unless you click the "back" button a few times, I often do this especially on mass storage drives at home (like 10 years worth of files) as it saves so much time remembering and searching where that important folder/file is at the time.

pedro52
pedro52

Is there a way to do this with Vista? I haven't tried all options listed here but a couple that are listed here that I had in my own reference book don't work. Thanks

scansite
scansite

Hi Mark, Thanks for this practical tip. What annoys me, is that when I do File Open, the folder view is never Details. Can you tweak XP, so that it shows the Details View? Thanks in advance for your feedback. Regards, Carl / Amsterdam / Holland

ashamess
ashamess

Great Post, Mark !! I'll be using it a lot !!

saaiebabak
saaiebabak

An excellent selfless free service to computer users. Many thanks. Dr. KB Saaie

sgivens
sgivens

Nice tip. I am curious what the /n flag does on the command line though. I'm not seeing a difference when I try it with and without. Where do I find more info on Explorer command options? "Explorer /?" didn't work. thx

John J.
John J.

This is an interesting tip and it works fine. But why bother? I just create shortcuts to the drives and folders I want to explor, name the shortcut descriptively (H JAJ takes me to - you guessed it - H:\JAJ) then drag them into the system tray. They've got the same folder icon as Windows Explorer. When I click it opens Explorer into the folder of my choice. Same result - yes?

Chipv
Chipv

Where did you find the command switches for Explorer??

RCS
RCS

Can't you just save a shortcut on the desktop to the folder and rename it? To access the explorter just click on "FOLDERS" This also lets you set icons on the desktop item to allow you to differentiate the folders.

Kamuela
Kamuela

Great tweak... Check out figure c, it depicts the m:/working folder instead of the u:/working folder called for in the example.

mailparikshit@yahoo.com
mailparikshit@yahoo.com

To get explorer without folder browser/folder tree c:\windows\EXPLORER.EXE /n, /select, u:\working folder

SJ5
SJ5

Quick and Easy. Thanks

Paul Newell
Paul Newell

Anyone know how to get the Windows Explorer default 'directory' to be the root of the "My Computer" applet?

ashu.wifi
ashu.wifi

chutia aadmi ka chutia funda haha

thesilverfox
thesilverfox

I've never understood why you can't just put your preferred target directory in the "Start in" box but I guess that's another story! On a related note, running [c:\windows\]explorer.scf is equivalent to using Mark's solution with a target of "c:\windows\EXPLORER.EXE /n, /e, c:\"

agedtea
agedtea

Excellent tip. Been wondering how I could make explorer open where I want it to open. This will save me alot of time. Only one thing I regret about the tip: No explanation was given what /n and /e stands for. Anyone?

mirossmac2
mirossmac2

What's wrong with simply renaming - for example - 'My Computer' to 'Resources' and putting a shortcut to it on the desktop? I've done this sort of thing with all those 'My ...' folders; and my desktop consists of nothing but shortcuts to my commonest folders and programs, which refresh in a flash when XP needs to refresh. Is this tweak really quicker?

adrian.march
adrian.march

Absolutely wonderful! I have cursed XP ever since I had it for its obsession with "My Documents", because I know better than XP where the documents are that I am interested in. I have compromised a little by putting all the files I normally work with in a folder called "My Actual Documents", and this is the folder that I have set explorer.exe to display. It is then just a single click to open the folder I need.

PF
PF

Very useful thanks

plustrad
plustrad

Excellent tweak. Wished I'd known it years ago. I hate all this 'My Computer' 'My asshole' stuff. It's like being talked to as a 12 year old. Thanks

boristhemoggy
boristhemoggy

Like most of the tips on here, it didn't work for me

Mark W. Kaelin
Mark W. Kaelin

What is your favorite Windows XP tweak or tip? If it is something we have yet to blog about in the TechRepublic Windows Blog, I'll publish it, give you credit, and send you some TechRepublic swag.

Editor's Picks