Link a folder or drive to another folder on Windows 8, 7, xp, vista

Windows has a very neat hidden feature which is only available for advanced PC users, just like in Linux, the windows file system allows for Junction Points and Symlinks.

A Symlink (Symbolic Link) is the ability to place a “folder” which is actually a link to another location on the system such as a folder or another hard disk, these are also referred to as Soft Links.

A Junction Point (or Directory Junction) tricks the whole Operating System into thinking a folder contains data but really it exists elsewhere on the system. So for example you could create a junction point from C:\windows\system32 to C:\Users\Deano\Desktop\Link. A folder named “Link” appears on your desktop and appears to contain all the files from System32, however modifying or creating files or folders actually results in the modification of the files/folders in C:\windows\system32, these are also referred to as Hard Links.

Hard Links (Junction Points) are much more useful than Soft Links (Symbolic Links) as they are completely transparent to the Operating System, allowing you to fool applications into thinking a file exists at a certain path but really it exists elsewhere, the most useful application for a Junction Point is when software forces you to use a certain path, such as a computer game or file syncing software such as DropBox. With a Junction point the data can exist in one central location but can be accessible at several other places. You can even create links across drives, so if a particular software cannot access a drive, you could create a Junction between the drives.

don't worry, Junction points are not mirrors and data is edited directly regardless of which entry path you come from.

 

Hard Vs Symbolic LInks

 

Creating a Symbolic Link (Soft Link)

In windows, click “Start” and type “Command Prompt”, right-click on the icon and click “Run as Administrator” to run Command Prompt with full privileges.

For example, lets say we wanted to make a link of the file C:\Users\Deano\Destop\test file.txt accessible from C:\test.txt also – here is the command:

MKLINK “C:\Users\Deano\Destop\test file.txt” “C:\test file.txt”

 

lets say we wanted to make a link of the folder C:\Users\Deano\Destop\ accessible from C:\Desktop Files also – here is the command:

MKLINK /D C:\Users\Deano\Destop\ “C:\Desktop Files\”

 

Note: Make sure C:\Desktop Files\ does not exist before running the command as it will create the shortcut folder automatically.
Note: This is just a shortcut and programs and OS can see this, when you open the folder it simply redirects to the physical location.

 

Creating a Junction Point (Directory Junction)

In windows, click “Start” and type “Command Prompt”, right-click on the icon and click “Run as Administrator” to run Command Prompt with full privileges.

For example, lets say we wanted to make a link of the folder C:\Users\Deano\Destop\ accessible from C:\Desktop Files also – here is the command:

MKLINK /J C:\Users\Deano\Destop\ “C:\Desktop Files\”

 

Note: Make sure C:\Desktop Files\ does not exist before running the command as it will create the junction folder automatically.

Facebooktwitterredditpinterestlinkedinmail
Author: Dean WilliamsI'm a Web Developer, Graphics Designer and Gamer, this is my personal site which provides PHP programming advice, hints and tips

Post Tags:
,
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments