Windows 2000 Directory Links Using LINKD.EXE

Windows 2000 users familiar with Unix might appreciate the ability to create directory links, something that has been available for some time in most versions of Unix. These links allow users to create virtual directories that point to remote locations. To users and applications, these links look and act just like regular directories.

On the surface, directory links are similar to Windows shortcuts. However, from a functional standpoint, the main difference is that links behave like directories. Traversing up or down links works as one would expect with actual directories. Clicking on a Windows shortcut, however, shifts the focus to the target directory. Moving up the tree will go to the actual parent directory, not back to the folder that holds the shortcut.

How to Create Directory Links in Windows 2000

Microsoft does not officially support linking, but does provide a couple of ways to take advantage of directory linking. The first way is by providing functions in the Windows application programming interface (API). Programmers can include function calls in their code to create directory links. The second, and more convenient way for typical users, is to use LINKD.EXE, an unsupported command-line tool found in the Windows 2000 Resource Kit.

Links are created using the following syntax:

LINKD Source [/D] Destination

  Source             - Displays the Windows NT name targeted by Source

  Source Destination - Links source directory to Destination directory or an NT
                       device or any valid Windows NT name

  Source /D          - Deletes Source, regardless of whether a link exists at

  /?                 - Prints this help message

LINKD grafts (links) the target name directly into the name space at Source,
so that Source subsequently acts as a name space junction. The Source directory
must reside on a disk formatted with NTFS 5.0. The destination (target of the
link) can be any valid directory name or device name or valid object name in
Windows NT. When the target name does not resolve to a directory or a device,
open calls fail.

All characters in both the Source and Destination names must be in the ASCII
character set. Usage of arbitrary Unicode characters is not supported.
Example: LINKD Docs "C:\Documents and Settings\Administrator\My Documents"
Creates junction "C:\Docs"

Directory links only work with NTFS 5.0. A link's source and target do not have to be on the same drive, but both have to reside on NTFS 5.0 partitions. Creating a link on an NTFS 5.0 partition that refers to a folder on a FAT32 partition will not work.

How to Get LINKD.EXE

LINKD.EXE is included in the Windows 2000 Resource Kit, which Microsoft offers for purchase. For those who would rather not pay for the resource kit, and have access to a PC running Windows 2003 or Windows XP, Microsoft is currently offering the Windows Server 2003 Resource Kit Tools free for download. While the resource kit is designed for Windows 2003, LINKD.EXE appears to also work perfectly on Windows 2000 and Windows XP.

The Windows 2003 Resource Kit Tools are available here. Note: The resource kit will only install on a PC running Windows 2003 or XP.

Parting Thoughts

Prior to NTFS 5.0, Microsoft had not provided the ability to create hard links within their file systems. Initially, Microsoft had intended to include directory linking as a basic feature in Windows Explorer. But midway during the beta cycle, Microsoft shifted gears and decided to remove the option.

So why would Microsoft not include such a useful capability within the operating system? After all, this feature has long been available in Unix, and the OS designers intended to introduce directory linking. The problem was that Microsoft developers could not guarantee that linking would not break any existing third-party applications. Microsoft decided to leave the functionality in NTFS 5.0, but not advertise or support it. The Windows API does allow current and future applications to take advantage of directory linking, and LINKD.EXE gives users a way to manually create links.

Related Pages

Microsoft Support Page: How to Create and Manipulate NTFS Junction Points (Article ID: 205524)
Windows 2003 Server Resource Kit Tools