Friday, February 28, 2014

Moving Windows Folders With Junction Points

In Dell's infinite wisdom, there was a time when they shipped their Windows 2003 servers with small (10 - 15 GB) system partitions.  It turns out that, over time, that partition would easily be filled by normal operating system updates and various other files.

Fast forward to current times, that partition is now teetering on the abyss with 200 - 300 MB free.  What to do.... what to do.

Well as the title of the article suggests, you can use the wonders of NTFS Junction Points to relocate some non-critical system folders.

Wikipedia has a great write up on the technical details of junction points here.

Now before you go and try to relocated every folder in the Windows directory, an important excerpt from Wikipedia:

Junction points aren't supported by Windows boot process, so it's impossible to redirect certain system folders

In my particular example, Windows Server 2003 doesn't include any method for creating junction points built in.  Lucky for us, Sysinternals has us covered:


So I put that executable in the system folder to allow quick use but you may place it wherever is convenient for you.

In my example I will be moving the ie8updates and ie7updates folders, normally located in the Windows directory.

First, I move (not copy) those two folders to their new final location.  Nothing special here.  A cut and then paste would work or drag drop or whatever.

From there we pop open our command prompt:


Then we will type junction originalpath destination path


As you can see in the screenshot, I redirected those two folders to a replica Windows folder on my D: partition.

And that's it.  Now when Windows goes to look for those folders, it will think they still exist in their original location on the C: parition but actually exist on the D: partition.