NTFS junction point
||This article may contain original research. (June 2010)|
An NTFS junction point is a feature of the NTFS file system that provides the ability to create a symbolic link to a directory which then functions as an alias of that directory. This has many benefits over a Windows shell shortcut (.lnk) file, such as allowing access to files within the directory via Windows Explorer, the Command Prompt, etc.
Junction points can only link to directories on a local volume; junction points to remote shares are unsupported.
Junction points are a type of NTFS reparse point; they were introduced with NTFS 3.0, the default file system for Windows 2000 (Windows NT 5.0). The Windows 2000 and Windows 2003 Resource Kits include a program called linkd, to create junction points; Mark Russinovich of Winternals released a tool called junction which provided more complete functionality. Windows XP includes
fsutil reparsepoint. Windows NT 6.0 and later operating systems include an mklink command-line utility for creating junction points.
Examples of use 
Program redirection 
By setting a junction point that points to a directory containing a particular version of a piece of software, it may be possible to add another version of the software and redirect the junction point to point to the version desired.
Saving disk space 
Since the contents of a junction do not take up any space (they simply point to the original files in the original directory) if you need to have multiple points of entry to a large directory, junction points will serve that purpose well. Do not confuse junction points with a copy of something as it simply points to the original. If directories need to be modified separately a junction cannot be used as it does not provide a distinct copy of the directory or files within.
Circumventing pre-defined paths 
Since reinstalling Windows (or installing a new version) often requires deleting the contents of the C: drive, it is advantageous to create multiple partitions so only one partition needs to be deleted during the installation. However, some programs don't let the user choose the installation directory, or install some of their files to the C: drive even when they are installed to a different drive. By creating a junction point, the program can be tricked into installing to a different directory.
Obtaining a list of junction points 
A list of all the junctions present in the current directory can be obtained from an elevated Command Prompt as Admin by executing "dir /aL", and a list of all the junctions present on a disk volume, by executing "dir /aL /s C:\", where "C:" is the volume to scan.
Creating or deleting a junction point 
A junction point can be created in XP (after installing; Server2003 Resource Kit) with
LINKD Source Destination
To delete it in XP, use:
LINKD Source /D
A junction point can be created in Vista or 7 with
To delete it in Vists or 7, use:
fsutil reparsepoint delete PATH
- folder containing hiberfil.sys (if it's configured to be outside root directory)
However it is possible to redirect non-critical folders:
- \Documents and Settings
- \Program Files
- \Program Files (x86)
See also 
- Sysinternals Junction documentation
- Microsoft Knowledge Base, 2007-02-20, How to create and manipulate NTFS junction points, http://support.microsoft.com/kb/205524/en-us
- Mark Russinovich, 2010-09-08, Junction, http://technet.microsoft.com/en-us/sysinternals/bb896768
- Microsoft Knowledge Base Article – 'How to Create and Manipulate NTFS Junction Points'
- Junction command line utility from Microsoft TechNet
- Codeproject Article – discussion on the source code of a junction point utility, aimed at programmers
- PC Mag Article about adding any directory to the start menu (allowing a preview within the startmenu as a submenu).