Create symbolic links & directory junctions (hard & soft file system links)

Posted on February 15th, 2007 by Jason

Windows Vista includes a great little utility that allows users to finally make soft and hard file system links in the file system. This can be very useful from a software compatibility standpoint as well as a great way to organize your computer. Unlike a shortcut, a link is at the file system level and can be used to create an alias for a file or folder that is in a different location. For example, you can create a hard link (Directory junction) called c:\win that points to c:\windows\system32. After the link is created, you can open up command prompt or explorer and browse to c:\win and you will see the contents of c:\windows\system32. This is not a new technology, it has actually been a core Linux and Unix feature for as far as I can remember but it is nice to finally have it in Windows Vista.

Links can be created with the mklink command line utility.

MKLINK [[/D] | [/H] | [/J]] Link Target

/D Creates a directory symbolic link. Default is a file symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction.
Link Specifies the new symbolic link name.
Target Specifies the path (relative or absolute) that the new link refers to.

Let’s say that you want to create a directory junction like I mentioned earlier called c:\win that points to c:\windows\system32:

Open up an Administrative Level command prompt.
Run: mklink /j c:\win c:\windows\system32

Tags: , , , , , , , , , , , , ,

Related posts

One Response to “Create symbolic links & directory junctions (hard & soft file system links)”

  1. Delooni.com - the world of IT Tips on 16 Feb 2007 at 5:38 am #

    link (Directory junction) called c:\win that points to c:\windows\system32. After the link is created, you can open up command prompt or explorer and browse to c:\win and you will see the contents of c:\windows\system32. This is not a new technology, it has actually been a core Linux and Unix feature for as far as I can remember but it is nice to finally have it in Windows Vista. Links can be created with the mklink command line utility. MKLINK [[/D] | [/H] | [/J]] Link Target

Leave a Reply