How to use NTFS Reparse Points

Windows XP Professional comes with a feature that UNIX has had for a long time: the ability to create links to objects stored elsewhere on the file system. These "reparse points" allow you to create things like hard links, junction and mount points. Reparse points are data areas in NTFS files with information that allows the operating system to redirect name-space lookups from one area of the file system to the other.

Hard links and junctions are directories that can be referred to by more than one path. Unlike UNIX symbolic links, you can't use create links/junctions for files with the standard Windows XP tools, but there are third-party ones that will do so (e.g., http://mrmills.arsware.org/HardLink).

Although there is a slight difference between the two, for the purposes of this article we'll treat hard links and junctions as the same and refer to them with the latter name.

To create a junction named c:\hardlink that points to a directory called c:\realdirectory (this has to exist for the linking to work), try this at the cmd prompt:

C:\>linkd hardlink realdirectory

Link created at: hardlink

This file in realdirectory:

C:\>dir realdirectory

11/06/2002 02:46 p.m. 41 realfile.txt 1 File(s) 41 bytesIs now also accessible through c:\hardlink:

C:\>dir hardlink

11/06/2002 02:46 p.m. 41 realfile.txt 1 File(s) 41 bytesThere are third-party GUI tools for manipulating junction points, but Microsoft only ships text-mode ones with Windows XP.

What can you use this for? By creating a hard link called "a" that points to c:\directory\subdirectory\anotherdirectory\furtherdirectory you have a Shortcut on steroids.

If you run out of space on your C:\ logical drive, but have space on D:\ on the same physical drive, you can move existing directories without having to reinstall programs - for instance, put C:\Program Files directory on D:\ and create a link called C:\Program Files.

To remove junction points, use the linkd program with the /d switch, like this:

C:\linkd hardlink /d

The delete operation succeeded.

Be careful with junctions, especially during delete operations. Unlike UNIX, deleting a junction point removes the files in the directory, not just the junction itself.

Reparse points also allow for mount points. These let you "mount" volumes on NTFS folders.

Mount points mean the end of the drive letter tyranny. No longer are you restricted to the 26 upper-case letters of the alphabet (A-Z) for your drives; in fact, you don't even have to use drive names like H: or J: - just create a folder on your hard disk, name it something descriptive and mount the volume on it.

Some caveats: mount points can only be accessed from within Windows XP or as shared folders across a network - remember this if your PC is dual-boot. Furthermore, Administrator privileges are required to create and delete mount points.

Windows XP Professional can create mount points referring to volumes with different file systems, such as CDFS, FAT32, FAT16 and FAT12. If it's removable media, however, ensure it's in the drive before creating mount points and that the directory is empty.

Use either the Disk Management Console or the command-line mountvol utility to create mount points.

Let's say you want to access a DVD drive through a folder called DVD_drive: type in diskmgmt.msc into the Run dialogue to start the Disk Management Console. Then, right-click the icon representing the DVD drive, and select Change Drive Letters and Paths; you can either add a mount point through Mount in the following empty NTFS folder, allowing access to the drive through the folder or a drive letter, or you can do away with the drive letter altogether. Bear in mind that this might break certain legacy apps expecting drive letters and, in some cases, autoplay stops working.

Mounting a new hard drive on an NTFS folder is equally easy: after the drive's been initialised and formatted, the Disk Management Console gives you the option of either assigning it a drive letter or using a mount point folder.

The "mountvol" command is a little more cumbersome to use as volume names are supplied as GUID (globally unique identifier) strings. First, find the GUID for volume E:

F:\>mountvol f: /L

\\?\Volume{4b177e76-2c7b-11d6-a87b-00a024e58e9c}\To mount the E: drive on F:\testdir1, do:

F:\>mountvol f:\testdir1 \\?\Volume{8ce633c1-3085-11d6-b9ee-806d6172696f}\Copy and paste the GUID to avoid typos, then check the mount point by typing:

F:\>mountvol testdir1 /l

\\?\Volume{8ce633c1-3085-11d6-b9ee-806d6172696f}\To delete the mount point, do:

F:\>mountvol testdir1 /d

Note that you cannot use Explorer to remove mount points.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Juha Saarinen

PC World
Show Comments

Father’s Day Gift Guide

Brand Post

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Tom Sellers

MSI P65

This smart laptop was enjoyable to use and great to work on – creating content was super simple.

Lolita Wang

MSI GT76

It really doesn’t get more “gaming laptop” than this.

Jack Jeffries

MSI GS75

As the Maserati or BMW of laptops, it would fit perfectly in the hands of a professional needing firepower under the hood, sophistication and class on the surface, and gaming prowess (sports mode if you will) in between.

Taylor Carr

MSI PS63

The MSI PS63 is an amazing laptop and I would definitely consider buying one in the future.

Christopher Low

Brother RJ-4230B

This small mobile printer is exactly what I need for invoicing and other jobs such as sending fellow tradesman details or step-by-step instructions that I can easily print off from my phone or the Web.

Aysha Strobbe

Microsoft Office 365/HP Spectre x360

Microsoft Office continues to make a student’s life that little bit easier by offering reliable, easy to use, time-saving functionality, while continuing to develop new features that further enhance what is already a formidable collection of applications

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?