When you run a phased migration from a file server to OneDrive for Business, you may find that some files never appear in the target OneDrive folders. This typically happens because the migration tool skips files that are locked, have unsupported characters in names, or exceed path-length limits. In other cases, the tool processes files out of order and later overwrites or skips files that changed during the migration window.
Phased migrations move data in batches over days or weeks. If a file on the source server is modified after its batch is scanned but before the batch is uploaded, the migration tool may treat the new version as a new file or skip it entirely. This article explains the specific root causes of missing files in phased OneDrive migrations and provides step-by-step procedures to identify and recover those files.
Key Takeaways: Recovering Files Missed During Phased Migration
- Microsoft 365 admin center > Migration > File shares: Use the migration dashboard to view per-item errors and skipped files for each batch.
- SharePoint Migration Tool (SPMT) scan report: Run a pre-migration scan to identify files with unsupported characters, long paths, or locked status before the first batch.
- File server audit logs or robocopy /L: Compare the source file list with the items that landed in OneDrive to find every file that was not migrated.
Why Phased Migrations Miss Files From a File Server
Phased migrations break the source file server content into multiple batches. Each batch is scanned, copied to Azure storage, and then written to OneDrive. The Microsoft 365 Migration API and the SharePoint Migration Tool both rely on a snapshot of the source folder at scan time. If a file is open, locked by another process, or renamed between the scan and the upload, the tool skips it.
The most common technical causes are:
- File locks and open handles: Any file that is open in an application or locked by the operating system at scan time is skipped. The tool does not retry locked files in the same batch.
- Unsupported characters in file names: Characters such as ~ ” # % & : < > ? / \ | are not allowed in OneDrive or SharePoint. Files with these characters in the name or path are silently skipped.
- Path length exceeding 400 characters: OneDrive and SharePoint have a 400-character path limit. Files with longer paths are skipped during migration.
- File modification after scan: When a file is modified after its batch is scanned, the tool may detect a checksum mismatch and skip the file, or it may overwrite the file in OneDrive with the old version and never upload the newer version.
- Empty folders: Some migration tools do not create folders that contain no files. If a folder has only subfolders that were skipped, the entire folder tree may be missing.
Phased migrations also introduce a timing risk. If batch 2 is scanned on Monday and uploaded on Wednesday, any files added to the source on Tuesday are not included in batch 2. Those files must be captured in a later batch or in a final delta pass. Without a final delta pass, those files are permanently missed.
Steps to Find and Recover Missing Files After a Phased Migration
Follow these steps to identify every file that was not migrated and then copy those files to the correct OneDrive location.
- Open the Microsoft 365 admin center migration dashboard
Sign in to the Microsoft 365 admin center at admin.microsoft.com. Go to Admin centers > Content migration. Select the migration project that contains your file server batches. Click Review errors to see every file that was skipped or failed. Export the error list to CSV. - Run a robocopy comparison between source and target
On the file server, open Command Prompt as administrator. Runrobocopy \\SourceServer\Share \\DestinationServer\OneDriveMirror /L /E /NJH /NJS /NP /NS /NC /NDL /LOG:C:\migration\compare.log. This lists every file that exists on the source but not in the target. The /L flag ensures no files are copied — only a log is created. Review the log for files that are missing from OneDrive. - Check the SharePoint Migration Tool scan report
If you used the SharePoint Migration Tool, open the SPMT desktop app. Click View reports next to your migration job. Look for the Scan report tab. This report lists files that failed pre-migration validation due to unsupported characters, long paths, or file locks. Export the report and cross-reference with the robocopy log. - Identify files that changed during the migration window
On the file server, use PowerShell to list files with a LastWriteTime between the start date of batch 1 and the completion date of the final batch. RunGet-ChildItem -Path \\SourceServer\Share -Recurse | Where-Object {$_.LastWriteTime -ge '2025-01-01' -and $_.LastWriteTime -le '2025-01-15'} | Export-Csv C:\migration\changed-files.csv. Compare this list with the files that exist in OneDrive. Any file that was modified during the migration but is missing from OneDrive needs to be manually copied. - Copy missing files to OneDrive using the OneDrive sync app
Install the OneDrive sync app on a Windows machine that has access to the file server. Sign in with the target user account. Map the OneDrive folder as a network drive or access it through File Explorer. For each file identified in the previous steps, copy it from the file server to the correct OneDrive subfolder. The sync app uploads the file to OneDrive automatically. - Run a final delta migration batch
In the Microsoft 365 admin center migration dashboard, create a new batch that includes only the file server path that was previously migrated. Set the batch to Delta migration mode. This scans only files that have changed since the last migration date. Run this batch after all file server activity has stopped. This captures files that were added or modified after the original batch scans.
If Files Are Still Missing After the Recovery Steps
Even after following the recovery steps, some files may remain missing. The following sections cover the most common residual problems and their specific fixes.
Files with unsupported characters in the name
OneDrive and SharePoint do not allow the characters ~ ” # % & : < > ? / \ | in file or folder names. If the scan report shows these characters, rename the file on the source server to remove or replace the unsupported character. Use a hyphen or underscore as a replacement. After renaming, copy the file to OneDrive using the OneDrive sync app.
Files with a path longer than 400 characters
The SharePoint Migration Tool skips files whose full path exceeds 400 characters. To fix this, shorten the folder structure on the source server. Rename deep subfolders to single-character names or move files closer to the root. After the path is under 400 characters, copy the files to OneDrive manually.
Files that were open during the batch scan
If a file was open in an application at the time of the batch scan, the migration tool skipped it. After the application is closed, the file is free. Run the delta migration batch again. The delta scan picks up files that were previously locked because their LastWriteTime or checksum changed when the lock was released.
Empty folders were not created
The SharePoint Migration Tool does not create empty folders by default. If you need the folder structure to be identical, create the empty folders manually in OneDrive through File Explorer or the OneDrive website. Use the OneDrive sync app to create folders on the local machine, and the folders sync to the cloud.
| Item | Full migration (single pass) | Phased migration (multiple batches) |
|---|---|---|
| Description | All data is scanned and uploaded in one continuous operation | Data is split into batches processed over days or weeks |
| File change risk | Low — the migration window is short and files rarely change during upload | High — files modified between batch scans and uploads can be missed |
| Delta pass required | Optional — recommended if source is still active | Required — without a final delta pass, changed or added files are permanently missed |
| File lock handling | Skips locked files — requires a retry pass | Skips locked files per batch — requires a delta pass after locks are released |
| Best for | Small to medium file servers under 1 TB with low change rate | Large file servers over 1 TB or servers that cannot be taken offline |
You can now identify every file that was skipped during a phased OneDrive migration and recover those files using the comparison logs, delta migration batch, and manual copy steps. For future migrations, run a pre-migration scan with the SharePoint Migration Tool to catch unsupported characters and long paths before the first batch starts. As an advanced tip, schedule a robocopy comparison job to run weekly during the migration window so you can detect missing files immediately rather than after the project completes.