Creating hard links in Windows 7

If you need to create a hard link on Windows (as opposed to soft links which are created by default), you can create it using command line. The exact syntax would be:

mklink /J <Link> <Target>

So say you need to create a link www in the current folder which needs to point to D:\my_files\html, the command would be:

mklink /J www D:\my_files\html

This utility works in Windows Vista and Windows 7, and should also work on Windows 8 & 10.