Monday, June 23, 2008

'Symlinks' in Windows

If you're a fan of symbolic links in *nix, you'll probably be excited to know that we've got them in the Windows world too (and they're called NTFS junction points). The reason most people haven't heard of them yet is because the Windows installation doesn't include the tools to work with them - you have to acquire them either as a Resource Kit or by downloading SysInternals Junction.

For most people, Windows shortcuts are good enough since you can just click on them and they mimic the behavior of the file that they point to. However, if you're writing a script file or have a reference to a library through your project, short cuts aren't of much help - short cuts are more of a GUI thing.

If you haven't bought a copy of the Windows Resource Kit, you can use SysInternals Junction, which is a free utility created by Mark Russinovich. You can download it from:
http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

If you've got the resource kit, you can use the Linkd.exe and Delrp.exe utilities to create and remove the symlinks.

No comments: