Results 1 to 2 of 2

Thread: Create a symlink in Windows

  1. #1
    Join Date
    Aug 2005
    Posts
    822

    Create a symlink in Windows

    Even if NTFS was under Windows 2000, made the symbolic links in directory (also known as directory junctions), it was not until the release of Windows Vista to finally have the ability to create symbolic links to files ( also known as soft link under Linux).

    A directory junction allows you to create a directory that points to a different directory. Thus, it is possible to select the directory C: \ sys32 to C: \ Windows \ system32. The advantage is to have a shorter way to go to your directory.

    It is also interesting to know that Windows manages symlinks locally, ie a link to a file on a remote server will be considered local. In this case, your symlink may well point to a file server remotely. Interesting, no?

    To create a symlink in Windows Vista, it is first necessary to open a command prompt by being logged on as an administrator.

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


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

    The syntax of the command and its available options.
    MKLINK [[/ D] | [/ H] | [/ J]] Link Target

    • / D: Create a symlink to a directory. By default, this is a symlink to a file.
    • / H: Create a real link instead of a symlink.
    • / J Creates a Directory Junction.
    • Link:Specifies the name of the new symbolic link.
    • Target:Specifies the path (relative or absolute) to which the new link refers to.


    Creating a symbolic link will then simply For example:
    mklink cmd \ Windows \ system32 \ cmd.exe


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

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


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


    Similarly, directory junctions will be marked as <JONCTION>.


    As for their display in Windows Explorer, the icons will be displayed with the shortcut arrow.

  2. #2
    Join Date
    Nov 2008
    Posts
    162

    Re: Create a symlink in Windows

    Note: Adding symlinks in Windows Vista has resulted in the modification of certain system commands. So if you want to delete a symbolic link, the Delete command does not follow the link (which destroy the target by pointing the link!) But simply remove the link itself.
    It is strongly recommended that you back up the registry, the system and your data before using this trick. TechArena.IN can not be held liable for any damage as a result of using this trick.

    Caution: If the Delete command knows the difference between a symbolic link with a real file or directory, it is not necessarily the case for all applications! Attention the false manipulation!

Similar Threads

  1. Replies: 4
    Last Post: 04-03-2014, 04:31 AM
  2. Replies: 2
    Last Post: 28-02-2012, 12:52 AM
  3. Configure symlink in Linux Mint to share partition
    By Rawana in forum Operating Systems
    Replies: 4
    Last Post: 02-02-2011, 10:11 AM
  4. Cannot create any DSN in Windows 7 (x64)
    By PWallace in forum Operating Systems
    Replies: 3
    Last Post: 22-12-2010, 03:24 AM
  5. Replies: 4
    Last Post: 30-03-2009, 11:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,520,989.85563 seconds with 17 queries