5

In Linux I can do this :

 ln -s /tmp/mydocs /home/user/docs/

it will create alias to /home/user/docs/ and I can access to docs with cd /tmp/mydocs/

In windows :

I have this directory c:\users\user1\docs\

i want to create shortcut named mydocs, so i can access to docs directory by cd mydocs

is this possible??

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Ould Abba
  • 201

1 Answers1

8

In Linux you can use ln command to create symbolic link, but in Windows you have to use mklink command to create symbolic links:

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.

Tip: Symbolic link just works on NTFS file system and Windows Vista, Windows 7, Windows Server 2008.

wonea
  • 1,877