[Review] What Is UNC Path and How to Use It? [MiniTool Wiki]

  • Linkedin
  • Reddit

Quick Navigation :

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.

backslash vs forward slash thumbnail
Backslash vs Forward Slash: Difference in Grammar, File Path

What’s the difference between backslash & forward slash? Are they the same in grammar, file path, keyboard, etc.? what’s their function in different systems?

Read More

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.

find UNC path in CMD

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.

  • Linkedin
  • Reddit