softlinks (symbolic links) and hardlinks in Windows

for the die hard unix and linux fans out there who appreciate the use of symbolic links and hard links, there’s actually a Windows equivalent out there. (then again, if you a die hard fan… you may not use windows much… but for those who do… keep reading…)

All these years, I thought the closest thing to symbolic links in Windows will be the shortcuts. However, In Vista and Windows 7 there is actually a good support for symbolic links and hard links. The command line utility to create/manage these links are not there by default however. One will need to download a package from Microsoft.

Now, I’ve discovered that someone has actually developed a Windows explorer shell extension to create/manage symbolic/hard links. You can download the freeware here.

I’ve downloaded and installed the utility called Link Shell Extension (LSE in short), and it works nicely for me. Mind you, I strongly encourage you to read through the online manual to understand how to use it effectively. It also has a good coverage on the pitfalls in the earlier version of Windows.

For the benefits of you who do not know what are symbolic/hard links, these are references to files and directories in your computers. There are many usage for these links, and the most common scenario is this….

Imagine you have a file located in c:usershellodocumentsdownloadsectionblahetcherethisfile.jpg

That is a very long reference to the file. To make things simple, you want the file to be available in c:directorythisfile.jpg but you need to keep a copy in the original location, and at the same time have c:directorythisfile.jpg as an exact copy. The traditional way is probably just to create a copy of the file, and anytime the original file is updated, we’ll just copy it again.

Now, imagine that we can create c:directorythisfile.jpg as a symbolic link to the original file. Access this symbolic link gives the exact same result as accessing the file directly. You can open, save, change the symbolic link just as if it’s a real file. And anytime the original file changes, you’ll get the update immediately. No need to copy the file over. In way, you save disk space as well, since there’s only one real copy of the file.

There’s a lot more to symbolic links and hard links, and you can easily find more information about them on the web.

Hope you’ll find this useful =)

Leave a Reply