Home » All » Customization » Vista » Windows | All Categories

Published on 07.15.08 by Brent Trahan

How to Create Symbolic Links

Learn how to create relative and absolute symbolic links in Windows Vista.

What Is a Symbolic Link?

A Symbolic Link acts (and looks) like a shortcut but provides a transparent link to the target file at the file system level instead of within explorer.

Symbolic Links are used most for backward compatibility. It can be used to trick software into thinking its accessing files at a location where the files have been moved.

Create a Relative or Absolute Symbolic Link

Relative Symbolic Links

A relative symbolic link is a symbolic link that identifies the location of its target by its location.

For Example: I created a folder called test in the root of C:\. I also created a text file called file2.txt in the folder called test. I’m going to create a relative symbolic link in the folder test I created called file1.txt to the text file file2.txt.

  1. Open the command prompt with admin privileges by clicking Start, All Programs, Accessories, right-click Command Prompt and then select Run as administrator.
  2. After navigating to the test folder I created I type mklink file1.txt file2.txt in the command prompt and then press enter.

Now if you open file1.txt file2.txt actually opens. To prove this, open file2.txt, type something in it and then open the file1.txt symbolic link.

Note: If the relative symbolic link is moved the link will not work anymore.

Absolute Symbolic Links

An absolute symbolic link is a symbolic link that identifies the location of its target by a full path.

Using the example above you’d type mklink file1.txt C:\test\file2.txt.

Note: If you move the absolute link to a different location it will still work.

Create a Symbolic Link to a Shared Folder

To create a symbolic link to a shared folder you’d type mklink file1.txt \\file-server\test\file2.txt or mklink file1.txt Z:\test\file2.txt for a mapped folder.

Still need help? Ask your computer question now.

Related Guides:

Leave a Reply

Subscribe to this guide's comments RSS feed.

Microsoft Windows is a registered trademark of Microsoft Corporation. Microsoft Corporation in no way endorses or is affiliated with MAXIMUMpcguides.com. All other products mentioned are registered trademarks of their respective companies. MAXIMUMpcguides IS NOT RESPONSIBLE for any damage or data loss to your computer from using this web site. All information on MAXIMUMpcguides is provided on an AS IS basis with NO WARRANTIES.

Copyright 2006-2019 Brent Trahan. All rights reserved.