When copying or moving files and folders with a network location or remote shared folder through mapped drive on Windows Explorer, File Explorer or Command Prompt, the file copying or moving transfer process will fail with the following error message:

Location is not available

<Mapped Drive Letter>:\ is unavailable. If the location is on this PC, make sure the device or drive is connected or the disc is inserted, and then try again. if the location is on a network, make sure you’re connected to the network or Internet, and then try again. If the location still can’t be found, it might have been moved or deleted.

Or,

Location is not available

<Mapped Drive Letter>:\ refers to a location that is unavailable. It could be on a hard drive on this computer, or on a network. Check to make sure that the disk is properly inserted, or that you are connected to the Internet or your network, and then try again. If it still cannot be located, the information might have been moved to a different location.

Location Is Not Available

To make matter worse, the error happens intermittently. Sometimes the file transfer operation can be performed successfully, yet at another time, it failed. In addition, you can continue to create, modify and delete files and folders on the mapped drive itself. However, the file copying or moving process works reliably if you’re using UNC path, i.e. \\computername\sharename.

The direct cause of the issue is due to UAC and the interaction with split token. The issue normally happens when file copying or moving process involves UAC approval to grant full administrator access token, or you created the mapped network drive in elevated session with Windows administrative privileges. With UAC (User Account Control) enabled, when an administrator logs onto a machine, Local Security Authority (LSA) creates two separate logon sessions and grants the two access tokens: a full administrator access token, which is disabled by default to remove elevated user rights and privileges, and a filtered standard user access token. Because LSA created the access tokens during two separate logon sessions, the access tokens contain separate logon IDs.

When network shares are mapped, they are linked to the current logon session for the current process access token. So a network share mapped with the filtered access token is not mapped for (and cannot accessed by) processes that run with the full administrator access token, vice versa. Microsoft provides detailed explanation about the design in KB2019185.

Resolution 1

Normally a file copying or moving process doesn’t require change into full administrator rights. Thus, ensure that you have full control or at least modify permissions on the files and folders that you want to copy or move on both locations. To check the permissions, right click on the file or folder, select Properties and go to Security tab. You can try to take ownership and grant full control permissions, especially on USB flash drive or portable hard disk which was previously used on other Windows PC, Linux or Mac OS X computer.

Resolution 2

Try to add the network location through the following steps:

  1. Open Windows Explorer or File Explorer.
  2. Select This PC in the navigation pane.
  3. Right click on empty space on the right pane, or from the Computer Ribbon menu, select Add a network location.

    Add a Network Location

  4. Follow the “Add Network Location” wizard to add in the shared folder and network drive.

    Add Network Location in Windows

    Note: Add network location essentially uses the UNC path instead of mapped drive.

Resolution 3

EnableLinkedConnections registry value enables Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 or later to share network connections between the filtered access token and the full administrator access token for a member of the Administrators group. After you configure this registry value, LSA checks whether there is another access token that is associated with the current user session if a network resource is mapped to an access token. If LSA determines that there is a linked access token, it adds the network share to the linked location.

  1. Run Registry Editor (regedit).
  2. Navigation to the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

  3. Right click on System, then point to New, and then click DWORD (32-bit) Value.
  4. Type EnableLinkedConnections, and then press ENTER.
  5. Right-click EnableLinkedConnections, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Restart the computer.