Fixed: Mapped drive gets disconnected when copying large files on Windows

Fixed: Mapped drive gets disconnected when copying large files on Windows

A mapped drive is useful when you want to transfer files between multiple computers over a network. However, sometimes the connected drive goes offline when copying large files. This usually happens because Windows automatically logs out of a session after a certain period of time. Fortunately, fixing the problem is not difficult, and below you will find all the ways to resolve the error:

Why does the connected drive get disconnected?

There can be various reasons why your connected drive is going offline. According to Microsoft, a mapped drive can go offline if it’s idle for too long to prevent wasting server resources on unused sessions. It usually turns off if the connected drive is not used for about 15 minutes or so.

However, there may be other reasons behind this. For example, the source computer of a mapped drive might be offline, the drive might be bad, or there might be network issues.

Fixed: Mapped drive gets disconnected when copying large files on Windows

Although the problem can occur for many reasons, fixing it is quite simple. To get rid of the error, here are a few methods you can try:

  1. command line method
  2. Using the Registry

You will need administrator permission to complete these steps. Also create a System Restore before making changes to the registry.

1] Disable the auto-disconnect feature using the command line.

As mentioned earlier, Windows automatically disconnects connected drives after a certain period of time. To prevent this, you can disable this feature. To do this, you need to follow these steps:

  • Right click the start menu.
  • Click Windows Terminal (Admin) > Yes.
  • In the Windows terminal, copy and run the following command and press the Enter key.

net config server /autodisconnect:-1

2] Disable auto-disconnect using the registry.

You can also change the auto-disable feature using the registry. However, Regedit cannot disable the auto-disconnect feature on the server side. But it does allow you to change the default timeout period for the auto disconnect feature. And for that follow these steps:

  • Press Windows Key + R to launch Run.
  • Type Regedit and press Enter.
  • Go to the following location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

  • In the right pane, you will find the auto-off value, right-click it and choose Edit.
  • If you don’t see the auto-disable value, right-click on an empty surface, select New > REG_DWORD > Name it auto-disable, and press enter.
  • In the Edit window, select Hexadecimal Value.
  • Finally, enter ffffffff in the data field and click OK.

Apart from the server side, the client side session is disconnected when the connection is idle for too long. However, you can extend your client machine’s uptime by creating a KeepConn value. To do this, follow these steps:

  • Press Windows key + R to launch the Run prompt.
  • Type Regedit and press Enter to open the Registry Editor.
  • Go to the following location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters

  • Now right click and select New > REG_DWORD Value and name it KeepConn.
  • Finally, double-click the value and enter a value between 1 and 65535 seconds. The default value is set to 600 seconds or 10 minutes. However, to prevent any unwanted shutdown of the server, set the maximum value.

Conclusion

So, these were some quick ways to fix mapped drive disconnecting when copying large files in Windows. I recommend disabling the Windows Auto Shutdown feature to prevent any problems in the future. But feel free to choose the right settings according to your usage.

How to disable a disabled network drive?

You can disable the network drive by going to File Explorer > This PC. Then, under Network Locations, right-click on the drive you want to disable and select Disable, and the drive will no longer be available on your computer.

How do I permanently map a network drive in Windows?

To map a network drive, you first need to enable network discovery by going to Control Panel > Network and Internet > Network and Sharing Center > Change advanced sharing settings.

Here, turn on all other features, and to share password protection, be sure to turn them off. After that, go to File Explorer > This PC, click on the three dots icon and select “Map Network Drive”. Then click “Browse”and select the folder you want to share online and you’re done.

Leave a Reply

Your email address will not be published. Required fields are marked *