OneDrive Migration Leaves Empty Folders Behind
🔍 WiseChecker

OneDrive Migration Leaves Empty Folders Behind

You migrated your files to OneDrive for Business, but now you see many empty folders in the cloud. This happens when folder structures are created but the actual files fail to upload or are skipped during the migration process. The root cause is often a mismatch between the source folder metadata and the sync engine rules, such as file name length limits or special characters. This article explains why empty folders appear after migration and how to identify and fix them without re-running the entire migration.

Key Takeaways: Fixing Empty Folders After OneDrive Migration

  • OneDrive Sync app > Pause sync > Resume sync: Forces a re-scan of the folder hierarchy and can trigger missing file downloads.
  • Migration tool log files: Review the log for error codes like 0x80070057 (invalid argument) or 0x8007007B (file name too long) to identify skipped files.
  • SharePoint Online > Document library > Settings > Permissions for this document library: Check that the user performing the migration has Contribute or Edit permissions on all target folders.

ADVERTISEMENT

Why OneDrive Migration Creates Empty Folders

When you migrate files to OneDrive for Business, the migration tool first creates the folder structure in the target location. Files are then uploaded individually. If a file fails to upload due to a blocked file type, a name that exceeds the 256-character path limit, or a permission error, the folder remains in place but empty. The migration log records the failure, but the empty folder is not automatically removed.

Another common cause is the use of the Copy operation instead of Move in tools like the SharePoint Migration Tool. A copy operation duplicates the folder structure but may skip files that are open, locked, or exceed the 15 GB file size limit for OneDrive. The tool reports the copy as successful for the folder, but the files are missing.

The OneDrive sync app itself can also produce empty folders. If you use Known Folder Move to redirect Desktop, Documents, and Pictures, the sync engine may create placeholder folders before the actual files are transferred. If the sync is interrupted, the folders remain but the files never arrive.

Steps to Identify and Fix Empty Folders After Migration

Follow these steps to locate empty folders and restore the missing files. Perform these actions on a Windows 11 or Windows 10 computer that is signed into OneDrive with the same account used for the migration.

  1. Open OneDrive sync status in File Explorer
    In File Explorer, navigate to the OneDrive folder. Look for folders that display no files but show a cloud icon in the Status column. Right-click the empty folder and select View online to open the folder in your web browser and confirm it is truly empty.
  2. Check the migration tool log files
    Open the SharePoint Migration Tool or the Microsoft 365 Migration Manager. Go to the Reports section and download the detailed error report for the migration job. Search for the folder name in the log. Look for rows where the Status is Skipped or Failed and the Item Type is File. The error code tells you why the file was skipped.
  3. Re-upload the missing files using the SharePoint Migration Tool
    Open the SharePoint Migration Tool. Select Start new migration and choose Files and folders. Browse to the source location that contains the missing files. In the target field, paste the URL of the empty folder in OneDrive or SharePoint. The tool will upload only the files that are missing, leaving the existing folder structure intact.
  4. Use Windows PowerShell to bulk-check empty folders
    Open PowerShell as an administrator. Run the command Get-ChildItem -Path "C:\Users\YourName\OneDrive - CompanyName" -Directory | Where-Object { $_.GetFiles().Count -eq 0 -and $_.GetDirectories().Count -eq 0 } | Select-Object FullName. This lists all empty folders in your OneDrive sync root. Review the list and compare it against the source to confirm which folders should have files.
  5. Clear the sync cache and re-sync
    If the empty folders were created by the sync app rather than the migration tool, reset the sync connection. Right-click the OneDrive icon in the system tray and select Settings. Go to the Account tab and click Unlink this PC. Sign in again and set up sync. This forces OneDrive to re-download the full file list and populate any placeholder folders that were left empty.

ADVERTISEMENT

If OneDrive Migration Still Leaves Empty Folders

Even after re-uploading files, some empty folders may persist. The following issues are the most common causes and their fixes.

OneDrive Shows Empty Folders After Known Folder Move

Known Folder Move redirects your Desktop, Documents, and Pictures folders to OneDrive. If the move is interrupted, the redirected folders appear in OneDrive but contain no files. To fix this, open OneDrive Settings, go to the Sync and backup tab, and click Manage backup. Verify that all three folders are listed as Backed up. If any folder shows Not backed up, click Start backup. OneDrive will re-scan the local folder and upload any missing files.

Migration Tool Reports Success But Folders Are Empty

This occurs when the tool creates the folder structure but encounters a transient error during file upload. The tool may report the job as Completed with warnings. Open the SharePoint Migration Tool, select the job, and click View warnings. Look for warnings with code SPM_WRN_FileSkipped. These indicate files that were skipped due to size, type, or name issues. Re-run the migration job with the Only upload modified files option selected to skip folders that already exist and upload only the missing files.

Empty Folders Created by Third-Party Migration Tools

Third-party tools like Mover or Sharegate may create empty folders when they encounter a file with a name that contains characters unsupported by OneDrive. Supported characters exclude ~ " # % & : < > ? / \ { | }. If a file name contains any of these, the tool skips the file but leaves the folder. Use a bulk rename utility to remove unsupported characters from the source files, then re-run the migration for only the affected folders.

Empty Folder Causes: Migration Tool vs Sync App

Item Migration Tool Behavior Sync App Behavior
Folder creation Creates all folders before uploading files Creates folders only when files are synced
Empty folder cause File upload failure due to name, size, or permission Interrupted sync or placeholder left after file removal
Error reporting Detailed log with error codes per file Sync status shows cloud icon but no error per folder
Fix method Re-upload missing files via migration tool Unlink and re-link OneDrive account

After completing the steps above, you can now identify and re-upload files that were skipped during migration, removing empty folders from your OneDrive. Next, run a full sync check by clicking the OneDrive icon in the system tray and selecting View sync conflicts to catch any remaining orphaned folders. As an advanced tip, use the PowerShell script Remove-Item -Path "folderpath" -Recurse only after you have confirmed that the folder genuinely contains no files and is not a required organizational placeholder.

ADVERTISEMENT