Reparsing Folders in XP

Since I do a lot of development on my PC, I spend a lot of time working with the “My Documents\Visual Studio 2005\Projects” folder.  However, I’ve been finding it inconvenient that I need to constantly browse down to it from within Windows Explorer so I set about trying to find a way to add a shortcut that appears in the main folder list on the left, as per the image below:

Windows Explorer Folders PaneMy first thought was to simply create a standard Windows shortcut on the desktop, since this is clearly what I needed.  However, shortcuts aren’t shown in this pane – I needed a folder.

Now, I could have just created a folder on the desktop and told Visual Studio to point to it, but I wanted to leave the original directory structure intact (and I don’t like to be defeated by a computer! 😉 ).  Clearly, I needed something along the lines of the “My Documents” functionality that allows you to point one directory to another.

I finally found what I needed in the form of NTFS Reparse Points.  It turns out that there are tools out there that will do this for you, but they are not without their challenges (such as the risk of deleting all your files!)  Unfortunately, information on how to create these manually is quite sparse, so I had to do some digging!

It turns out that there’s a registry key that allows you to specify a new target for a directory, if used correctly:

Registry Key

If this key is referenced in a Desktop.ini file within a system folder, we can set it up to redirect to a shortcut names 'Target' in the same folder!

How to do this

  1. Create a new directory on the Desktop.
  2. Create a Desktop.ini file in the new folder containing the following:

  3. Create a shortcut, also in the new directory, pointing to the actual directory of interest (in my case, the Visual Studio Projects folder).
  4. Rename this directory to Target.
  5. Now open a command prompt and navigate to the Desktop directory (ie. the parent of your new directory).
  6. Execute the following DOS command to specify that your new directory is a system folder:attrib +s <New Directory Name> /s /d

    where <New Directory Name> is the name of the directory that you’ve just created.

Congratulations – you’ve just created your shortcut directory! 🙂

If you ever need to remove it, you first need to remove the reparse point.  To do this, go back out to a command prompt in the parent directory and type:

attrib -s <New Directory Name> /s /d

Now you’ll be able to delete the Desktop.ini file and the shortcut, as well as the actual directory.

Enjoy! 🙂

About The Author


John is a Senior Solutions Engineer for a U.S. IT company, specialising in Software Defined IT Infrastructure. He has an extensive background in IT and spends way too much time sitting at his PC's, making videos for himself and other Internet marketers and dreaming of spending more time boating. He's also passionate about Jesus.

Comments are closed.