Monthly Archives: July 2009

How To: Move File Shares to new location on a Windows Server

This is fairly Network 101, but I created it for our internal knowledge base anyway, and figured it might be useful.

Follow the following procedure to move a shared folder from one drive to another.

Note: The hard part about this is migrating permissions with the files. Using normal “copy” utilities to copy or move the data without the correct options can result in permissions not being applied correctly at the destination.

Part 1 – Copy the Data
Do not move the data, as if something occurs in a “move” operation, half the file structure can be located at Point A and the other half coule be located at Point B, leaving you a mess to clean up. Better to do a successful Copy then delete the source after a few days once you’re confident everything has been transferred successfully.

  1. Copy the directory / permissions structure using XCOPY.Go to a command prompt, and issue the following command (tailor to your needs):

    xcopy “C:\Source Folder” “D:\Destination Folder” /O /E /F /Y /T

    The /T command ensures that you are only copying the folder structure and not actual files within the folders. For more XCOPY commands, use xcopy /?

  2. Using SyncToy (google for “SyncToy” and download the utility), synchronize the source and destination folders together.

Part 2 – Move the Shares

  1. Remove¬†the current¬†Share names.Go to Start > Run… and type compmgmt.msc

    Under the Shared Folders node, expand it to show “Shares“. Right click on the Shares node and click the Export List… menu option.

    IMPORTANT: If there are specific permissions settings on each Share entry, make a note of them.

    Once you’ve saved the list of shares to a file, right click the shares that were previously associated with the source folder you copied, and click Stop Sharing. This will remove the share from the list.

  2. Recreate the exact share names again, with the destination folders.Open Windows Explorer (right click Start and go to Explore) and navigate to your newly copied folders. Refer to the exported list you created in Step 1 to re-create the shares with their exact names.
  3. Set the correct Share permissions (not normal Windows Security) on the “Sharing” tab of the folder properties. This is normally “Full Control” for “Authenticated Users”.

If you have moved the shares correctly, using the same names, clients mapped to drives using the \\server\ShareName will not notice any interruption or change, and no change will need to be made on the client side.