It makes life easier If we want our music accessible from our Desktop in stead of from /home/user/Documents/Music/rock/black_metal/heluva_music
It will be accessible from the desktop even if the actual data are kept in /home/user/Documents/Music/rock/black_metal/heluva_music
So symlinks are basically advanced shortcuts which make important files accessible from multiple locations
But not everybody knows that you can symlink in Windows too.
For that you need to install the free Link Shell Extension On this page you will also find Visual Studio 2005 redistributable whis is neccessary to set things up so download and install both.
(Who said that Windows was easier than Linux?
So now we are ready to go then:
Windows 7/Vista
You need to open an administrator command prompt (cmd).
Now we have the cmd "terminal" open and can writer the command with the following syntax:
Code: Select all
mklink /prefix link_path file/folder_path(Notice that this is opposite of the Linux syntax where the actual content comes first and the symlink location second.)
mklink can be used in combination with the following switches:
/D – creates a soft symbolic link, which is similar to a standard folder or file shortcut in Windows. This is the default option, and mklink will use it if you do not enter a prefix.
/H – creates a hard link to a file
/J – creates a hard link to a directory or folder
So if I want the content of my dropbox accesible from my desktop instead of from Documents I would do something like this
Code: Select all
mklink /J C:\Users\viking\Desktop\Dropbox C:\Users\viking\Documents\DropboxAgain: C:\Users\viking\Desktop\Dropbox is where I want it to appear and C:\Users\viking\Documents\Dropbox is where the data are.
So if you navigate to your desktop in explorer you will find all the dropbox data there.
This was for directories but you can use the same syntax for a file.
If there are spaces in your paths you have to put quotes(") around it - like this:
Code: Select all
mklink /H “C:\Users\viking\Desktop\RTFM.pdf”  “C:\Users\viking\Downloads\Before you ask for support.pdf”In windows XP this will not work you will have to use something called junction instead (it is a free tool).
go to the path (cd) were you saved junction and enter your commands there.
Code: Select all
junction –s link_path file/folder_pathjunction can only create hard symlinks.
To create a symlink to the music folder on the desktop:
Code: Select all
junction -s “C:\Documents and Settings\Administrator\Desktop\Music” “C:\Documents and Settings\Administrator\My Documents\My Music”Well that is about it - and it is a bit complicated. And it works differently on different Windows versions - not so in Linux
When will those Windows guys stop fiddling
