'mklink'

  • A file that acts like a representation of a target file on the same drive
  • Has the same size as the target without duplicating it (doesn’t use any space)
  • Interpreted at the operating system level (SW apps act upon the target through the link)
  • Deleting the Hard Link does not remove the target file
  • If the target is deleted, its content is still available through the hard link
  • Changing the contents through the Hard Link changes the target contents1)
  • Must reside on the same partition as the target file
  • Compatible with Win2k and above in Windows
  • A file that acts like a representation of a target directory, partition or volume on the same system
  • Has the same size as the target without duplicating it (doesn’t use any space)
  • Interpreted at the operating system level (SW apps act upon the target through the link)
  • Deleting the Junction Point does not remove the target2)
  • If the target is moved, renamed or deleted, the Junction Point still exists, but points to a non-existing directory
  • Changing the contents through the Junction Point changes the target contents
  • Can reside on partitions or volumes separate from the target on the same system
  • Compatible with Win2k and above in Windows
  • A file containing text interpreted by the operating system as a path to a file or directory
  • Has a file size of zero
  • Interpreted at the operating system level (SW apps act upon the target through the link)
  • Deleting the Symbolic Link does not remove the target
  • If the target is moved, renamed or deleted, the link still exists, but points to a non-existing file or directory
  • Points to, rather than represents, the target using relative paths
  • Can reside on partitions or volumes separate from the target or on remote SMB network paths
  • Compatible with UNIX and UNIX-like systems and with Vista and above in Windows

Shortcut

  • A file interpreted by the Windows shell or other apps that understand them as paths to a file or directory
  • File size corresponds to the binary information it contains
  • Treated as ordinary files by the operating system and by SW programs that don’t understand them
  • Deleting the shortcut does not remove the target
  • Maintains references to target even if the target is moved or renamed, but is useless if the target is deleted
  • Points to, rather than represents, the target
  • Can reside on partitions or volumes separate from the target on the same System
  • Compatible with all Windows versions
1)
Some text editors save changed text to a new file and delete the original file, which can break the link. This behavior can be changed in some editors by forcing a save over the original file instead. See discussion at Jameser’s Tech Tips here for more information.
2)
A Junction Point should never be removed in Win2k, Win2003 and WinXP with Explorer, the del or del /s commands, or with any utility that recursively walks directories since these will delete the target directory and all its sub-directories. Instead, use the rmdir command, the linkd utility, or fsutil (if using WinXP or above) or a third party tool to remove the junction point without affecting the target. In Vista/Win7, it’s safe to delete Junction Points with Explorer or with the rmdir and del commands.