Migrated Home Drive Files Do Not Sync: OneDrive for Business Fix
🔍 WiseChecker

Migrated Home Drive Files Do Not Sync: OneDrive for Business Fix

After migrating files from a home drive or network share to OneDrive for Business, many users find that some or all of the migrated files never start syncing. The OneDrive sync client may show a status of idle, stopped, or missing files even though the files exist in the cloud. This problem typically occurs because file paths exceed the 400-character limit, file names contain unsupported characters, or the folder structure was not flattened before migration. This article explains why migrated files fail to sync and provides step-by-step fixes to resolve the issue without re-migrating everything.

Key Takeaways: Fixing Migrated Files That Won’t Sync in OneDrive

  • OneDrive Settings > Sync and backup > Manage backup > Update folders: Verify that the migrated folder structure is selected and that no folder is excluded from sync.
  • File Explorer > Right-click file > Properties > General > Security: Check that the file is not blocked (Unblock button appears) after migration from a network drive.
  • PowerShell command Get-ChildItem -Recurse | Where-Object { $_.FullName.Length -gt 400 }: Identifies files with paths longer than 400 characters, which OneDrive cannot sync.

ADVERTISEMENT

Why Migrated Home Drive Files Fail to Sync in OneDrive

When you copy or move files from a home drive H: or a network share \\server\share to a OneDrive folder, the files retain their original metadata, including long file paths, special characters, and NTFS permissions that are incompatible with OneDrive’s sync engine. OneDrive has a maximum path length of 400 characters for the full path including the OneDrive root folder. Home drives often contain deeply nested folder structures that push paths beyond this limit.

Additionally, Windows File Explorer may mark files copied from network locations as blocked because they originated from another zone. OneDrive treats blocked files as unsafe and refuses to upload them. Finally, file names containing characters such as " : < > ? \ | are invalid in OneDrive and cause the sync to skip those files silently.

File Path Length Limits

OneDrive for Business enforces a 400-character limit on the full file path when syncing. This includes the OneDrive root folder path, such as C:\Users\username\OneDrive - Contoso\. If a nested folder structure adds more than 400 characters, the file is skipped. Home drive migrations often copy folder structures like Department\Projects\2024\Q4\Reports\Draft\Final\, which can easily exceed the limit.

Unsupported Characters and File Names

OneDrive does not allow file or folder names that begin or end with a space, contain trailing periods, or include the characters " : < > ? \ |. Home drives sometimes contain files with these characters from legacy applications. OneDrive skips these files without an error message in the sync status.

Blocked Files from Network Zones

When you copy a file from a network drive or home drive, Windows attaches a zone identifier that marks the file as coming from the internet or another computer. OneDrive’s sync client blocks upload of files with the Mark of the Web flag. You must unblock these files manually or use a script to remove the zone identifier.

Steps to Fix Migrated Files That Won’t Sync

  1. Check OneDrive sync status and identify skipped files
    Open OneDrive by clicking the cloud icon in the system tray. Select Help & Settings > View sync problems. Review the list of files that OneDrive could not sync. Note the file names and paths. This list shows the reason for each failure, such as path too long or invalid characters.
  2. Enable long path support in Windows 10 and 11
    Press Windows key + R, type gpedit.msc, and press Enter. Navigate to Computer Configuration > Administrative Templates > System > Filesystem. Double-click Enable Win32 long paths, set it to Enabled, and click OK. Restart the computer. This allows OneDrive to handle paths up to 32,767 characters on the local system, though OneDrive’s cloud limit remains 400 characters.
  3. Shorten file paths by moving files to a shallower folder
    In File Explorer, navigate to the OneDrive folder. Create a new folder at the root level, such as MigratedFiles. Move the deeply nested files into this folder. Keep the folder structure no more than three levels deep to avoid hitting the path limit. After moving, OneDrive will detect the changes and start syncing.
  4. Rename files with unsupported characters
    Use File Explorer to locate files with characters " : < > ? \ | in the name. Right-click the file, select Rename, and remove or replace those characters with a space or hyphen. For many files, use PowerShell: Get-ChildItem -Recurse | Where-Object { $_.Name -match '[\":<>?\\|]' } | Rename-Item -NewName { $_.Name -replace '[\":<>?\\|]', ' ' }. Run this in the OneDrive folder to batch-fix all files.
  5. Unblock files migrated from network drives
    Open File Explorer and select all files in the OneDrive folder that came from the home drive. Right-click, select Properties. On the General tab, if you see a Security section with an Unblock checkbox, check it and click OK. To unblock all files in a folder, use PowerShell: Get-ChildItem -Recurse | Unblock-File. Run this in the OneDrive folder.
  6. Pause and resume OneDrive sync
    Right-click the OneDrive cloud icon in the system tray. Select Pause syncing > 2 hours. Wait 30 seconds, then right-click again and select Resume syncing. This forces OneDrive to re-scan the folder and pick up newly renamed or moved files.
  7. Reset OneDrive if files still do not sync
    Press Windows key + R, type %localappdata%\Microsoft\OneDrive\onedrive.exe /reset, and press Enter. Wait for OneDrive to restart. If it does not restart automatically, type the same command again without the /reset flag. This clears the sync database and forces a full re-scan of all files.

ADVERTISEMENT

If OneDrive Still Has Issues After the Main Fix

OneDrive shows syncing but no files appear in the cloud

This usually means the files are still blocked or the folder is excluded from sync. Go to OneDrive Settings > Sync and backup > Manage backup. Confirm that the migrated folder is listed under Folders you’re backing up. If not, click Update folders and add it. Also check OneDrive Settings > Account > Choose folders to ensure the folder is selected for sync.

Files are corrupted or unreadable after migration

If you copied files using the Cut command and the network connection dropped during transfer, files may be truncated. Use a tool like Robocopy with the /MIR and /R:3 /W:5 flags to re-copy only the changed or missing files. Run robocopy H:\MigratedFolder C:\Users\username\OneDrive - Contoso\MigratedFolder /MIR /R:3 /W:5 in an elevated Command Prompt.

OneDrive sync stops with error 0x8007016a (Cloud File Provider)

This error indicates that OneDrive cannot access the local cache. Press Windows key + R, type %localappdata%\Microsoft\OneDrive\onedrive.exe /reset, and press Enter. After the reset, right-click the OneDrive icon and select Settings > Sync and backup > Advanced settings > Files On-Demand. Turn off Files On-Demand, click OK, then turn it back on. This rebuilds the cloud file provider cache.

Home Drive Migration vs Native OneDrive Sync: Key Differences

Item Home Drive Migration (Copy/Paste) Native OneDrive Sync (Upload from Source)
Path length handling Preserves original long paths; may exceed 400-character limit Automatically truncates or warns about long paths during upload
File blocking Files are marked as blocked from network zone; requires manual unblock Files uploaded via browser or OneDrive sync client are not blocked
Special characters Retains invalid characters; must be renamed manually OneDrive web interface rejects files with invalid characters during upload
Metadata preservation Preserves NTFS permissions, timestamps, and attributes Only preserves timestamps; permissions are not synced
Sync speed Initial sync may be slow due to large number of small files Optimized for batch upload with progress indicators

After applying the steps above, you can now sync migrated home drive files that previously failed. For future migrations, use the SharePoint Migration Tool (SPMT) which automatically handles path length and character issues. To prevent recurrence, limit folder nesting to three levels and avoid special characters in file names from the start.

ADVERTISEMENT