This library sponsored by MiniTool mainly defines a UNC path and its valid form, lists examples in both Unix and Windows systems, methods to find and create a UNC path, as well as compare UNC path and mapped network drive.
What Is UNC Path?
A UNC path can be used to access network folders, files, etc. resources. It must be in the format specified by the Universal Naming Convention (UNC), which is the naming system applied in Microsoft Windows.
UNC path is a standard to identify servers, printers, and other resources within a network, which originated in the Unix community. It makes use of double slashes or backslashes to precede the name of the computer in Windows. The paths (disks and directories) within the computer are separated with a single slash or backslash (\).
On the contrary, in Unix systems including Unix and Linux-related OSes like macOS and Android, they use forward slashes (/) instead of backslashes.
Valid UNC Path
A valid UNC path must include at least 2 path components of the 3, <servername>, <share>, and <filename>, which are referred to as the first pathname component, the second pathname component, and the third pathname component respectively. The last component of the path is also referred to as the leaf component.
Servername
The server-name consists of either a network name string set by an admin and maintained by a network naming service such as DNS or WINS, or by an IP address. Normally, those hostnames refer to either a Windows PC or a Windows-compatible printer.
Share
The share-name section indicates a label created by an administrator or sometimes within the OS. In most Windows systems, the built-in share name admin$ refers to the root directory of the OS installation, usually C:\Windows but sometimes C:\\WINDOWS.
However, UNC paths don’t contain driver letters, only a label that may reference a particular drive.
Also read: What Is UNCServer.exe Process and Should I Remove It?
Filename
Within a UNC path, the filename refers to a local subdirectory beneath the share section. This portion is optional. When file name is specified, the UNC path simply points to the top-level folder of the share. Besides, file_path must be absolute/fully qualified instead of relative. You can use relative paths only by mapping a UNC path to a drive letter.
The size and valid characters for a path component are defined by the protocol used to access the resource and the type of resource being accessed. The only restriction placed on path components by DFS is that path components must be one or more characters in length and mustn’t contain a backslash or a null.
UNC Path Examples
For Unix: //servername/path
For Windows/DOS: \\servername\path
How to Find UNC Path?
How to find the UNC path of a mapped network drive? Just run net use in CMD or PowerShell.
How to Create a UNC Path?
You are able to create a UNC path in Windows Explorer. Simply, right-click a folder and select one of the Share menu options to assign it a share name.
UNC Path vs Mapped Drive
A mapped network drive can be an alternative to a UNC path and both of them can be used in Microsoft Windows Explorer, Command Prompt, or PowerShell. With proper security credentials, you can map network drives and access folders on a remote PC using its drive letter rather than a UNC path.
Related article:
- How to Record a Video with a Filter on PC/iPhone/Android/Online?
- Is 144FPS Video Possible, Where to Watch & How to Change FPS?
- How to Tag People in Google Photos Manually & Remove Tags?
- How to Crop Photos for Instagram & Why Does Instagram Crop Photos
- [Step-by-Step] How to Crop Someone into a Photo by Photoshop?