A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/windows/win32/fileio/creating-symbolic-links below:

Creating Symbolic Links - Win32 apps

The function CreateSymbolicLink allows you to create symbolic links using either an absolute or relative path.

Symbolic links can either be absolute or relative links. Absolute links are links that specify each portion of the path name; relative links are determined relative to where relative–link specifiers are in a specified path. Relative links are specified using the following conventions:

A symbolic link can also contain both junction points and mounted folders as a part of the path name.

Symbolic links can point directly to a remote file or directory using the UNC path.

Relative symbolic links are restricted to a single volume.

Example of an Absolute Symbolic Link

In this example, the original path, 'X' ,contains a component, 'absLink', which is an absolute symbolic link. When 'absLink' is encountered, the fragment of the original path up to and including 'absLink' is completely replaced by the path that is pointed to by 'absLink'. The remainder of the path after 'absLink' is appended to this new path. This now becomes the modified path.

X: "C:\alpha\beta\absLink\gamma\file"

Link: "absLink" maps to "\\machineB\share"

Modified Path: "\\machineB\share\gamma\file"

Example of a Relative Symbolic Links

In this example, the original path, 'x', contains a component 'link', which is a relative symbolic link. When 'link' is encountered, 'link' is completely replaced by the new fragment pointed to by 'link'. The remainder of the path after 'link', is appended to the new path. Any dots (..) in this new path replace components that appear before the dots (..). Each set of dots replace the component preceding. If the number of dots (..) exceed the number of components, an error is returned. Otherwise, when all component replacement has finished, the final, modified path remains.

X: C:\alpha\beta\link\gamma\file

Link: "link" maps to "..\..\theta"

Modified Path: "C:\alpha\beta\..\..\theta\gamma\file"

Final Path: "C:\theta\gamma\file"

Symbolic Links

Hard Links and Junctions

Naming Files, Paths, and Namespaces


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4