This is the third time I’ve had to look this up, so into the blog it goes.
With Vista, Windows finally kind of supports symbolic links, though in general you would never know they were symbolic. Here’s a symlink you might want to set up if you do a lot of Symfony-based development:
mklink /D sf "C:\Program Files\PHP\data\symfony\web\sf"
The forward-slash “D” is for “directory”. Note that you can’t just link to a directory; you have to define what the local instance will be referred to as (in this case, also “sf”).
You can see that a link is symbolic when you do a “dir”:
10/20/2009 08:49 AM sf <SYMLINKD> [C:\Program Files\PHP\data\symfony\web\sf]
You can also add a “Link target” column to Windows Explorer. Other than this, however, there seems to be no convenient way to identify links as being symbolic.
mklink’s symbolic soft links behave more like hard links when copying and the like. Oddly, in Windows Explorer when you try to copy a symlink folder to the same directory, instead of saving the symlink folder as, for example, ”sf – Copy”, it instead copies all the files inside the folder and saves them as copies there.
I’m going to have to find something that plays a little more nicely with a large Subversion repository when doing a lot of branching and merging. Perhaps I can get real-ish symlinking to work with Cygwin.