Relocation

How to move shared folder to another drive on Windows 10

Yes, it's possible to move a shared folder to another driver on the same computer without permissions reconfigurations – here are two ways to complete the task.

Windows 10 move shared folder another drive

On Windows 10 (or Windows 11), if the computer is acting as a file sharing server, the time might come when you may need to move a folder share to a new drive. For example, because the old storage is running out of space, you are upgrading the storage, or it makes logical sense to migrate the data to another drive.

Whatever the reason it might be, Windows 10 does not include a tool to make the process easy, but it’s not impossible. If you need to move a shared folder to another drive preserving permissions and without reconfiguration in the clients, you can complete this task by copying the contents to the new drive and either modifying the Registry or changing drive letters, depending on the setup.

In this guide, you will learn the steps to move a folder share to a new drive in the same computer or server without network users noticing the change or reconfiguring the share on Windows 10. This should also work on Windows 11, Windows Server 2019, 2016, and 2012.

Move shared folder to new drive modifying Registry on Windows 10

Before proceeding, make sure that no one is accessing the files in the shared folder. Also, you will be modifying the Registry. As a result, it’s recommended to make a backup of the system before making changes if you need to roll back.

To move a shared folder to a new drive in the same computer, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to copy the shared folder content to the new drive on the same computer and press Enter:

    robocopy C:\SOURCE-SHARE D:\DESTINATION-SAHRE /R:5 /W:2 /Copyall /E /MIR

    In the command, make sure to update the source and destination paths with the locations that apply to your setup.

    For example, this command copies the data from “MyShare” folder in the “C” drive to the “MyShare” folder in the “D” drive on the same server.

    robocopy C:\MyShare D:\MyShare /R:5 /W:2 /Copyall /E /MIR

    Robocopy copy files new drive

  4. Open Start.

  5. Search for Registry and click the top result to open the app.

  6. Browse the following path:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
  7. Right-click the “String” with the shared folder name to move to a new drive and select the Modify option. For example, MyShare.

    Registry Share

  8. In the “Path” field, change the drive letter with the letter to the new destination. For example, change C for D if the data has been moved to the “D” drive.

    Change shared folder drive info

  9. Click the OK button.

  10. Restart the computer.

Once you complete the steps, network users should be able to access the files in the shared folder from the new location.

Here’s a breakdown of the Robocopy options:

  • /R:5 — Retries 5 times (you can specify a different number, the default is 1 million).
  • /W:2 — Waits 2 seconds before retrying (you can specify a different number, the default is 30 seconds).
  • /Copyall — Copies all file information (equivalent to /copy:DATSOU).
  • /E — Copies Subdirectories, including empty ones.
  • /MIR — Mirrors a directory tree (equivalent to /e plus /purge). Using this option with the /e option and a destination directory overwrites the destination directory security settings.

This is an example of the command you can use to move the data with their permissions to the drive. However, depending on your environment, you may need to use different options. For example, you can use the “/MT:n” switch to perform multi-threaded copies with n threads (default is 8).

Move shared folder to new drive changing drive letter on Windows 10

If the data resides on a drive other than the “C” drive, you do not need to modify the Registry. You can use Robocopy to copy the files to the new drive and then change the letter of the new driver to the previous letter, assuming that you don’t have an application or another share that will be affected by this change.

To move a folder share to a new drive by changing the drive letter instead of modifying the Registry, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to copy the shared folder content to the new drive on the same computer and press Enter:

    robocopy C:\SOURCE-SHARE D:\DESTINATION-SAHRE /R:5 /W:2 /Copyall /E /MIR

    In the command, make sure to update the source and destination paths with the locations that apply to your setup.

    For example, this command copies the data from “MyShare” folder in the F drive to the “MyShare” folder in the D drive on the same server.

    robocopy F:\MyShare D:\MyShare /R:5 /W:2 /Copyall /E /MIR
  4. Open Start.

  5. Search for Disk Management and click the Create and format hard disk partitions to open the app.

  6. Right-click the source drive and select the Change Drive Letter and Paths option.

    Change drive letter and paths

  7. Click the Change button.

    Change drive letter option

  8. Check the Assign the following drive letter option.

  9. Select another drive letter to free up the current letter.

    Set different drive letter

  10. Click the OK button.

  11. Click the Yes button to confirm.

  12. Right-click the destination drive and select the Change Drive Letter and Paths option.

  13. Click the Change button.

  14. Check the Assign the following drive letter option.

  15. Select the drive letter that was using the source drive.

    Set new drive old letter

  16. Click the OK button.

  17. Click the Yes button to confirm.

After you complete the steps, the shared folder will become available from the new location, but users won’t notice the difference since you also change the drive letter.

Only after you have confirmed that everything is working correctly, you can proceed to delete the old shared folder to free up space (as needed).