Surprisingly, all the good Windows features are hidden, undocumented and hard to find. It took me nearly a decade to accidentally find out that Windows has symbolic links. They are called NTFS Junction Points. However their support is limited to directory links, and the usage is a bit weird.
Oh, and you have to install Windows Resource Kit to get the functionality. You can download it from any of these locations:
- http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
- http://www.petri.co.il/download_windows_xp_reskit_tools.htm
The command you want is linkd. Let's take it for a spin.
The sandbox contains a directory named
original
with text.txt
inside.To create a symbolic link named
symlinked
that points to original
, the command is linkd symlinked original
. In POSIX it would be ln -s original symlinked
.When calling
dir
, symlinked
shows as "junction". The other behavior is like a plain folder. In explorer you cannot tell the difference between the two.To delete the symlink use
rmdir
, because del
will attempt to remove the files from original directory.