Wednesday, January 6, 2016

files - How do I create a symbolic link in Windows?



Windows Vista added the ability to create symbolic links to files and directories. How do I create a symbolic link and what are the current consumer and server versions of Windows that support it?


Answer



You can create a symbolic link with the command line utility 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.



Symbolic links via mklink are available since Windows Vista and Windows Server 2008. On Windows XP and Windows Server 2003 you can use



fsutil hardlink create  


According to msdn.microsoft, Symbolic Links are NOT supported on FAT16/32 and exFAT. It seems Windows only supports them from or to NTFS-Partitions. Future Windows operating systems are likely to continue support for mklink.



You can read further information about this new feature on Microsoft TechNet, Junfeng Zhang's blog or howtogeek.com.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...