How to Create Symbolic Links

Posted on July 17th, 2008 by Jason

What Is a Link?

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

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

Create a Relative or Absolute Link

Relative : A relative link is a 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 link in the folder test I created called file1.txt to the text file file2.txt.

1. Open the prompt with privileges by clicking Start, All Programs, Accessories, right-click Prompt and then select Run as .

2. After navigating to the test folder I created I type mklink file1.txt file2.txt in the 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 link.

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

Absolute

An absolute link is a 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 to a different location it will still work.
Create a Link to a Folder

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

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

Share and Enjoy:
  • del.icio.us
  • StumbleUpon
  • Facebook
  • Google
  • Furl
  • Live
  • MisterWong.DE
  • NewsVine
  • Reddit
  • Slashdot
  • Technorati
  • YahooMyWeb
  • BlinkList
  • description
  • Fark
  • Netvouz
  • Spurl
  • MisterWong
  • Webnews.de
  • Blogsvine
  • description
  • IndiaGram
  • kick.ie
  • Taggly
  • E-mail this story to a friend!
  • Print this article!

Related posts

Leave a Reply