File Share Migration Creates Duplicate Folders: Root Cause and Fix
🔍 WiseChecker

File Share Migration Creates Duplicate Folders: Root Cause and Fix

When migrating file shares to SharePoint, duplicate folders often appear in the destination site. You see two folders with the same name, or a folder plus a subfolder that copies the parent name. This happens because of a mismatch between how Windows file shares handle folder metadata and how SharePoint maps paths during migration. This article explains why duplicate folders occur and provides a step-by-step method to prevent and fix the problem.

Key Takeaways: Preventing Duplicate Folders During File Share Migration

  • SharePoint Migration Tool (SPMT) settings: Use the “Preserve user permissions” and “Only perform migration” options to avoid folder duplication.
  • Source folder structure cleanup: Remove hidden system folders like “DfsrPrivate” and “System Volume Information” before migration.
  • Map root folder correctly: Point the migration tool to the share root, not a subfolder, to prevent path overlap.

ADVERTISEMENT

Why File Share Migration Creates Duplicate Folders

Duplicate folders occur because of a path mismatch between the source file share and the SharePoint target. When you use a migration tool like the SharePoint Migration Tool (SPMT) or a third-party tool, it reads the full path of each file. If the source path includes a folder that the tool also creates as a root mapping, the same folder appears twice in SharePoint.

For example, you have a file share at \\server\sales. Inside that share, there is a folder named “Reports.” The tool maps the source path \\server\sales\Reports to the SharePoint document library. During migration, the tool creates the “Reports” folder and also copies files into it. But if the tool also creates a folder named “sales” because the root share name is included, the result is a folder “sales” containing a subfolder “Reports.” The user sees two locations for the same data.

Another common cause is hidden system folders. Windows file shares often contain folders like “DfsrPrivate,” “System Volume Information,” or “Recycle.Bin.” These folders are hidden in Windows Explorer but visible to migration tools. If the tool copies them and then later copies the user-created folders, the system folders appear as duplicates under different names.

Steps to Prevent Duplicate Folders During Migration

  1. Clean up the source file share
    Before starting the migration, remove all hidden system folders and temporary files. On the source server, open File Explorer, go to the share root, and enable “Show hidden items.” Delete folders named “DfsrPrivate,” “System Volume Information,” “Recycle.Bin,” and any folder starting with “$.” Delete shortcut files (.lnk) and temporary files (.tmp, .bak).
  2. Map the root folder correctly in SPMT
    Open the SharePoint Migration Tool. When adding a source, select the root folder of the file share, not a subfolder. For the target, select the SharePoint document library. Do not add a subfolder path to the target URL. This prevents the tool from creating an extra folder level.
  3. Use the “Preserve user permissions” option
    In SPMT, go to Settings. Check the box for “Preserve user permissions.” This keeps the folder structure intact without re-creating folders.
  4. Enable “Only perform migration” mode
    In SPMT, under Settings > Advanced, select “Only perform migration.” This skips the scan phase that can misinterpret the folder structure.
  5. Run a test migration on a small folder
    Create a test folder with three files and migrate it to a temporary SharePoint library. Verify that no duplicate folders appear. If duplicates appear, adjust the source path and retry.

ADVERTISEMENT

If Duplicate Folders Already Exist in SharePoint

If the migration has already created duplicate folders, you can fix the structure without redoing the entire migration.

  1. Identify the duplicate folders
    Open the SharePoint document library in a browser. Switch to the “Documents” view. Look for folders with identical names or a folder that contains a subfolder with the same name. Note the exact names and paths.
  2. Use SharePoint Explorer View to move files
    Open the library in File Explorer by clicking “Open in Explorer” (Edge or Internet Explorer mode). Select all files in the duplicate folder that has fewer files. Drag them to the correct folder.
  3. Delete the empty duplicate folder
    After moving the files, delete the empty duplicate folder. Go to the library, select the folder, and click “Delete.” Confirm the deletion.
  4. Check for inherited permissions
    Right-click the remaining folder, select “Manage access.” Verify that permissions are inherited from the parent library. If not, click “Stop inheriting permissions” and then “Delete unique permissions.” Reapply inheritance.

Common Migration Issues That Look Like Duplicate Folders

SPMT Shows Two Folders After Scan but Before Migration

This happens when the scan phase is run on a folder that has subfolders with the same name as the parent. Cancel the migration, delete the scan results from the SPMT task list, and restart with the root folder only.

OneDrive Sync Shows Duplicate Folders After Migration

OneDrive sync may create local copies of folders that appear as duplicates. In OneDrive Settings, under “Account,” stop syncing the library. Delete the local folder from File Explorer. Restart sync. The correct folder structure will download.

Third-Party Tool Creates Folders Named with GUIDs

Some tools create folders named with a GUID (e.g., {1234-5678}). This is a metadata folder used for internal tracking. Do not delete it. Instead, hide it from users by setting the folder to “Restricted” in SharePoint permissions.

Source Folder vs SharePoint Folder: Migration Behavior

Item File Share Source SharePoint Destination
Folder creation One folder per path segment One folder per path segment, but root share name may be added
Hidden system folders Present but hidden in Explorer Visible if migration tool copies them
Path mapping \\server\share\folder Library/folder or Library/share/folder
Permission inheritance Inherited from parent folder Inherited from library if tool preserves permissions

Now you can run a file share migration without creating duplicate folders. Clean the source share, map the root correctly, and use the SPMT settings described above. If duplicates already exist, move files and delete the extra folder. For large migrations with many subfolders, run a full scan with SPMT in preview mode first. This shows you the exact folder structure before any data moves.

ADVERTISEMENT