Tuesday, March 19, 2019

Softlink on Windows

To create a symbolic/soft link on Linux we runs command:
      ln -s <source> <s-link>

There is a similar one on Windows, but it is not Shortcut which is a different thing.

We can use command mklink:
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.

For example, to create a symbolic link to a directory, we could:
      mklink /d <s-link> <source-directory>

The positions of source and destination are different from those on Linux.

No comments:

Get This <