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??

1

1 Answer 1

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.

1
  • +1 for answering with MKLINK. I got tired of looking at answers that recommend DOSKEY. Sep 25, 2014 at 20:30

Not the answer you're looking for? Browse other questions tagged .