Archive for the 'development' Category

Jun 13, 2008

mklink: no longer just a vista tease

Author: gaweee | Filed under: development

i was working with .net dev studio and was trying to figure out how to make several projects share a common folder of master files. So we came across mklink. For all you folks out there rushing to open your command prompt in anything lesser than Vista, give it up, it aint gonna work. Vista onwards only baby~

The method signature is as follows:

MKLINK [[/D] | [/H] | [/J]] Link Target
 
        /D      Creates a directory symbolic link.  Default is a file
                symbolic link.
        /H      Creates a hard link instead of a symbolic link.
        /J      Creates a Directory Junction.
        Link    specifies the new symbolic link name.
        Target  specifies the path (relative or absolute) that the new link refers to.

I posted on how the tool didnt allow directories to be hard linked previously.
Correction: directories can be symbolic linked that will be resolved by the filesystem. The confusion there was when a symbolic link is created, it looks no different from a shortcut on explorer. Giving doubt to whether it would hold its ground when accessed programmatically instead of via the explorer.

Thanks Alex for pointing this out!

Recent Comments