CopyPastehas never been so tasty!

Guide to Symbolic Links on Windows

by maddyacca

  • 0
  • 0
  • 0

We will also tell you the procedure of using symbolic links to link any anything in windows 7, vista, xp, and ubuntu.So What Are Symbolic Links Anyway?Symbolic link or symlink is the same thing with two different names; symlink is the short form of symbolic link. Symbolic links can be created to files and folders individually and when they appear they are store in the folder with their links and this symbolic link points to real location of the files and folders. There are two types of symbolic link:Hard symbolic link,Soft symbolic link,Soft symbolic linkThis link is work like the standard link or you can say standard shortcut when you click on the link its open the folder where the files are stored.Hard symbolic link In the hard link files and folders are exist at the location of symbolic link and the application are same like in original.Why should I use Symbolic Links?Symbolic links are use for different things so here we will tell you where it is used mostly.

You can use it for synchronize any folder with Dropbox like synchronize your Pidgin Profile Across Computers.You can move the folder from its original location for changing the setting by any program.You can store Music, Pictures, and Videos on a second hard drive and you can have access to show them in Music, Pictures, and  Videos  folders. So that will be detected to media program.You can access your important files from multiple locations,There are also many more advantages of it.Now we are going to tell you that how you cancreate symbolic link for the movement of files to different folders or different drive. For this you have to perform these simple steps.Close that all programs that can access that file or folder.Change the location of the file or folder where you want. 

To create symbolic link follow these instruction correctly for your operating system.You should not need to create the symbolic link inside the symbolic link for example if the file has symbolic link folder that you should not create the symbolic link for the file. If you will do this then loop will create which will create millions of problems.Create Symlinks in Any Edition of Windows in Explorer,You can create the symbolic link with free Shell Extension to all the version of the windows version easily otherwise this is very difficult to create the link. For this purpose you need to download Visual Studio 2005 redistributable and Link Shell Extension itself. Visual Studio 2005 has all the necessary prerequisites so this essential to download. So download and run Visual Studio 2005 first.

After this install the Link Shell Extension, during the installation the taskbar will be disappear temporary and will come back fast.After this process you can create the symbolic links. For this simply you need to search the file and folder and right click on it and select Pick Link Source.Now to make symlink, right click on the folder of your choice and chose “Drop as” and then there are many choices to select. We will select “Hard link Clone” so it will create hard link for the selected item. For the soft link you have to click on the symbolic link. For copying the file and link without breaking you need to select smart copy.You can see hard link folder on the desktop. You can see the path of the folder Desktop\Downloads, where it’s originally stored. C:\Users\Matthew\Desktop\Downloads

Here’s our hard-linked folder on our desktop.  Notice that the folder looks like its contents are stored in Desktop\Downloads, when they are actually stored in also see the link which is created with Link Shell Extension which has red arrow on them.In XP it’s also work in the same way.Symlinks via Command PromptYou can also create the symbolic link with the command prompt in windows 7, vista and XP.In Windows 7/VistaFor vista and windows7 we will use mklink command for creating the symbolic link. For this open the administrator command prompt. In the search menu of the start button enter “command” then right click on the command prompt and then “Run as administrator”.

Now to make symbolic link you need to enter this command prompt Mklink /prefix link_path file/folder_path.Here you need to select correct prefix because mklink can make several types of links like these:/D – if you will not enter the prefix then this default option for the mklink. It creates a soft symbolic link, which is same like standard folder or file shortcut in Windows./H – This is for the hard link creation./J – this hard link creates to directory or folder.Now when you will select the correct prefix then enter the path for symbolic link and also the original path of file or folder. For example you want folder in Drop box folder to appear which is save in desktop then you will write this code:

mklink/JC:\Users\Matthew\Desktop\Dropbox C:\Users\Matthew\Documents\Dropbox.Here in the above lines of code the first path is of  symbolic folder  and the second one is for real folder.In the screen shot you can see the symbolic link of music folder created by the command prompt.When we see it in the explorer you can see real music is restored in C:\Users\Matthew\Music and this is look like C:\Users\Matthew\Desktop\Music.If there are spaces in the path then you can cover those with quotes. The important thing is this that the link have different name rather than file name. Now this is the example of creation of symbolic link for the document on the desktop.Mklink/H“C:\Users\Matthew\Desktop\ebook.pdf”

“C:\Users\Matthew\Downloads\Before You Call Tech Support.pdf”Remember this syntax

Mklink /prefix link_path Target_file/folder_path.In Windows XP.We will use here the junction toll because windows XP have not built-in command prompt for symbolic links. Firstly you need to down load the junction and unzip the folder now open the command prompt and enter cd with the path of the folder where you want to save the junction.

The Symbolic link created by the junction is always hard symbolic link but we can create the soft symbolic link also. For the hard symbolic link you have to write this code in command prompt:Junction –s link_path file/folder_path.If the file and folder path has spaces then you need to put the quotes around the path in mklink for pointing the file and folder it has different names.We will create symbolic link on desktop to My Music Folder so we will write:Junction-s“C:\Documents and settings\Administrator\Desktop\Music” “C:\Documents and Settings\Administrator\My Documents\My Music”.Here you can see the content of the symbolic link. You can see from the path which shows files are stored in Music folder directly on the Desktop but these are actually stored in My Documents\My Music. You can see this work with both folders and individual file.

Junction can work in vista and window7 also but there is option of symbolic link so we use that in it.Symlinks in Ubuntu.It’s very easy to create the symbolic link Linux distros such as Ubuntu because UNIX based operating system support the symbolic link. You do not need the graphical way like in Link Shell Extension for Windows. So you can do it in terminal.For open the terminal first open the Application menu chose Accessories and then click on Terminal and write this:ln –s file/folder_path link_path.Here the interesting thing is that you have to enter the source link first and then path but its opposite in windows.For example, create the symbolic link of Pictures folder on Desktop. You have to write:ln -s /home/maguay/Pictures /home/maguay/Desktop.You can see here the content of the symbolic link that picture looks as they are stored directly in the picture folder but they are actually stored in maguay\Pictures

Delete Symlinks.For removing the symbolic link just delete it. You can delete the link by command prompt but simple deleting is the easiest way.Conclusion.We can use symbolic link for helping to stayed organized and keep hard drives from overflowing.Conclusion



Add A Comment: