Universal Naming Convention (UNC)

...also known as Uniform Naming Convention

What is UNC?

UNC, short for universal naming convention (or uniform naming convention), is a special way to address network locations and devices using Microsoft networking software such as Microsoft Windows and the family of Microsoft Server packages available from the company. Samba also makes use of UNC in the same way. Its usage is very intuitive allowing quick access to resources in remote locations through operations as quick and easy as Start > Run, then typing the UNC path.

Format

1. For shared data:

\\NetworkLocation\Folder\Resource

2. Or for printers, etc.:

\\NetworkLocation\Resource

Here "NetworkLocation" can be an IP address such as "192.168.1.1" or a computer name such as "HomeComputer". The maximum number of characters for Windows XP and beyond is 248. The "\\?\" prefix is acceptable for UNC paths. It allows extended path lengths. NOTE: Some programs will require the backslash (\) to be escaped with a second backslash, i.e. \\\\NetworkLocation\\Resource.

Usage

UNC is often used when mapping a network drive. A UNC file path to a remote directory can be mapped with the appropriate naming convention (see above).

Mapping a network drive in Windows XP/Vista

  1. Click on the Start button
  2. Right click on "My Computer" (or "Computer" in Vista) in the start menu
  3. Click "Map Network Drive..."
  4. Select the drive letter
  5. Use the appropriate UNC to the path of the folder you wish to map, i.e. \\192.168.1.100\Documents
    Tip: After typing the IP address or folder name, wait for a few seconds as Windows will list all of the available folders under the resource
  6. Typically you will want to select "Reconnect at logon" to re-map the drive each time you start Windows
  7. Click "Finish

Mapping a network drive in Windows XP/Vista using a batch file script

  1. Create a new file in the Program Files > Startup folder named "map.bat"
  2. In the file use the following script:

    net use [driveletter]: \\NetworkLocation\Resource

  3. Save the file and run to map drive. Drive should now map each time Windows starts

Documentation

Further documentation on paths and UNC can be found at the MSDN website: http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx

Software that uses UNC

 

Site owned and operated by BJ Sintay. Copyright 2010.