Friday, 5 October 2012

How to create a symbolic-link (hard-link) in Windows

Windows XP/Windows Server 2003

By default Windows XP and Windows Server 2003 do not have any utilities to make a symbolic-link. Use either linkd or junction.

  1. Download linkd from here
    http://www.microsoft.com/en-us/download/details.aspx?id=17657
  2. From the command-line type the following to create, for example, a symbolic-link called link in c:\ to the folder c:\folder.
    linkd c:\link c:\folder


    or
  3. 
    
  4. Download junction from here
    http://technet.microsoft.com/en-us/sysinternals/bb896768
  5. From the command-line type the following to create, for example, a symbolic-link called link in c:\ to the folder c:\folder.
    junction -r c:\link c:\folder

Windows Server 2008/Vista/Windows 7

Use mklink.
  1. From the command-line type the following to create, for example, a symbolic-link called link in c:\ to the folder c:\folder.
    mklink c:\link c:\folder

References

http://www.microsoft.com/en-us/download/details.aspx?id=17657
http://technet.microsoft.com/en-us/sysinternals/bb896768
http://support.microsoft.com/?kbid=205524


No comments:

Post a Comment