Symbolic Links

Vista and WIN7 now supports symbolic links, a feature that has been enjoyed in UNIX for a long time.

D:>mklink
Creates a symbolic link. 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.

Here is an example of how it works.

D:>mklink /d d:foo d:example1example2example3example4
symbolic link created for d:foo <<===>> d:example1example2example3example4

D:>dir
Directory of D:
02/18/2010  07:47 PM   < DIR>          example1
02/18/2010  07:48 PM    <SYMLINKD>     foo [d:example1example2example3example4]

Now I can save myself some typing by doing a “cd d:foo” instead of “cd d:example1example2example3example4”.

For more information, see the following from MSDN:


Comments

Leave a Reply