Create a symbolic link in Windows Vista
Windows Vista can finally create symlinks as is already the case for Linux command ln. Let us look more closely at how to do this and what commands to use.

Even if the system had NTFS under Windows 2000, made the symbolic links on directory (also spoke on junctions directories), it was not until the release of Windows Vista to finally have the opportunity to create symlinks on files ( also known as soft link Linux).

A junction directory can create a directory pointing to a different directory. Thus, for example it is possible to select the directory C:\sys32 to C:\Windows\system32. The advantage is therefore to have a shorter way to go.
It is also interesting to know that Windows manages symbolic links locally, ie a link pointing to a file present on a remote server will be deemed to be local. In this case, your symlink may well point to a file server at a distance. Interesting, no?

To create a symbolic link in Windows Vista, it is first necessary to open a command prompt being logged in as:

  • Go to the Start menu and type cmd in the fields of research.
  • Once the cmd.exe file is found, click the right mouse button and select Run as administrator.

Once in the command prompt, creating a symbolic link is realized with the command mklink.

Here is the syntax of the command and its available options:

MKLINK [[/ D] | [/ H] | [/ J]] Link Target
/ D: Creates a symbolic link to a directory. By default, it is a symbolic link to a file.
/ H: Creates a real link to place a symbolic link.
/ J: Creates a junction directories.
Link: Specify the name of the new symbolic link.
Target: Specifies the path (absolute or relative) to which the new link refers.

The creation of a symbolic link will then simply come, For example:

mklink cmd\Windows\system32\cmd.exe

If we want to create such a link C:\sys32 pointing to C:\Windows\system32, we need to create a junction directory as follows:

mklink /d C:\ sys32 C:\Windows\system32

When you list a directory with the DIR command in a command prompt, symbolic links will be marked as <SYMLINK> with the target indicated in brackets.

Similarly, the junctions of directories will be marked as <JONCTION>.

When their display in Windows Explorer, their icons are displayed with the small arrow shortcut.

Note: The addition of symlinks in Windows Vista has resulted in the modification of certain orders of the system. So if you want to remove a symbolic link, the Delete command will not follow the link (which effects the target by pointing the link!) But simply remove the link itself.

Caution: if the Delete command knows the difference between a symbolic link with a file or directory real, this is not necessarily the case for all applications!