Symbolic Links on Windows 10

Screenshot of Link Shell Extension
Operating Systems Personal Technology Uncategorized
This is not meant as a tutorial in any way, I’m simply trying to not forget this as I need it about once every two years or so and always forget how to do it. The information was found here: https://superuser.com/questions/1020821/how-to-create-a-symbolic-link-on-windows-10 The option I went with was the PowerShell route suggested by Peter Hahndorf:
Open a PowerShell session as elevated administrator:
New-Item -ItemType SymbolicLink -Path E:\Data\MyGames -Target "C:\users\UserName\MyGames"
or using less verbose syntax:
ni E:\Data\MyGames -i SymbolicLink -ta "C:\users\UserName\MyGames"
Another approach is a Windows Shell extension which looked interesting but probably overkill for my current needs (from odvpbre):
If you want a GUI Tool for making/editing that symlinks use http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html Link Shell Extension (LSE) provides for the creation of Hardlinks , Junctions , Volume Mountpoints , and Windows7/8’s Symbolic Links, (herein referred to collectively as Links) a folder cloning process that utilises Hardlinks or Symbolic Links and a copy process taking care of Junctions, Symbolic Links, and Hardlinks. LSE, as its name implies is implemented as a Shell extension and is accessed from Windows Explorer, or similar file/folder managers. The extension allows the user to select one or many files or folders, then using the mouse, complete the creation of the required Links – Hardlinks, Junctions or Symbolic Links or in the case of folders to create Clones consisting of Hard or Symbolic Links. LSE is supported on all Windows versions that support NTFS version 5.0 or later, including Windows XP64 and Windows7/8/10. Hardlinks, Junctions and Symbolic Links are NOT supported on FAT file systems, and nor is the Cloning and Smart Copy process supported on FAT file systems.
Screenshot of Link Shell Extension
Link Shell Extension
  Some additional information on different types of links from http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#hardlinks : Hardlinks are a feature common to many Unix based systems, but are not directly available with NT4/W2K/WXP. It is a feature, which must be supported by the file system of the operating system. So what are Hardlinks? It is common to think of a file as being an association between a file name and a data object. Using Windows Explorer, the file system can be readily browsed, showing a 1:1 relationship between the file name and the data object, but this 1:1 relationship does not hold for all file systems. Some file systems, including UFS, XFS, and NTFS have a N:1 relationship between file name and the data object, hence there can be more than one directory entry for a file. So, how does one create multiple entries for the same data object? In Unix there is a command line utility ln, which is used to create link entries for existing files, hence there are many file names, or so called Hardlinks, for the one data object. For each HardLink created, the file system increments a reference count stored with the data object, i.e. it stores how many file names refer to the data object, this counter is maintained (by the file system) within the data object itself. When a file name referencing a data object is deleted, the data object’s reference count is decremented by one. The data object itself only gets deleted when the reference count is decremented to zero. The reference count is the only way of determining whether there are multiple file name references to a data object, and it only informs of their number NOT there whereabouts. Junctions are wormholes in the tree structure of a directed graph. By browsing a Junction a maybe far distant location in the file system is made available. Modifying, Creating, Renaming and Deleting files within a junction tree structure operates at the junction target, i.e. if you delete a file in a Junction it is deleted at the original location. Symbolic Links are to files what Junctions are to folders in that they are both transparent and Symbolic. Transparency means that an application can access them just as they would any other file, Symbolism means that the data objects can reside on any available volume, i.e. they are not limited to a single volume like Hardlinks. Symbolic Links differ from Shortcuts in that they offer a transparent pathway to the desired data object, with a shortcut (.lnk), something has to read and interpret the content of the shortcut file and then open the file that it references (i.e. it is a two step process). When an application uses a symlink it gains immediate access to the data object referenced by the symlink (i.e. it is a one step process).

Limitations

  • Supported platforms are NT4/W2K/WXP/W2K3/W2K3R2/W2K8/W2K8R2/W2K12/W2K12R2/WXP64/Vista/Vista/Windows7/8/10 in 32bit, 64bit or Itanium.
  • Hardlinks can only be made on NTFS volumes, under the supported platforms.
  • Hardlinks can only be made within one NTFS volumes, and can not span across NTFS volumes.
  • Junctions can not be created on NTFS volumes with NT4.
  • The Pick Link Source and Drop … choices are only visible, if it’s possible to create Hardlinks/Junctions/Symbolic Links. E.G.: If you select a file on a FAT drive and press the action button, you wont see the Pick Link Source in the action menu, because FAT file systems, don’t support Hardlinks/Junctions/Symbolic Links. This also happens, if you select source files on a network drive, or select a file as destination, etc.
  • There is an OS limit of creating more than 1023 hardlinks per file. This is less known, but it is there.
  • ReFs does not support hardlinks.