Why OneDrive Changes Office File Sizes During Migration
Question details
The user wants to understand why Office files can change size after OneDrive or SharePoint migration and how to verify whether their contents changed.

- Product
- OneDrive, SharePoint, and Microsoft Office
- Device & OS
- not provided
- Scenario
- Office files are copied to a synchronized folder during migration and compared with their originals using Robocopy.
- Observed behavior
- Some Office files are slightly larger after synchronization, so Robocopy reports them as changed even though their timestamps remain the same.
Choose an affected file and keep its original available for comparison. Wait for OneDrive synchronization to finish, and avoid opening or editing either copy during the test.
Compare the original and synchronized Office files
Use file sizes and hashes to determine whether synchronization changed the file's binary contents.
DOCX, XLSX, and PPTX files are ZIP-based packages. A size change could result from metadata changes or recompression during cloud processing, but the exact cause cannot be confirmed from size alone.
Matching timestamps do not prove that two files have identical contents. A different SHA-256 hash indicates that their bytes differ, even if the document appears unchanged.
In File Explorer, check the OneDrive status of the copied file. If Files On-Demand is enabled, right-click it and select Always keep on this device, then wait for the download to finish.
Right-click the original file and select Properties, then repeat for the synchronized copy. Compare the Size in bytes shown for each file.
Open PowerShell and run Get-FileHash -Algorithm SHA256 -LiteralPath "C:\Source\Example.docx" and Get-FileHash -Algorithm SHA256 -LiteralPath "C:\OneDrive\Example.docx", replacing both paths with your actual file paths. Compare the Hash values.
Run robocopy "C:\Source" "C:\OneDrive\Target" /L /E /FP /BYTES with your actual folder paths. The /L option lists what Robocopy would copy without copying files.

Test an archive when exact file bytes must be preserved
Package files in a ZIP archive and verify a downloaded copy before choosing a migration method.
Work with Migrated Office Files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing migrated Office documents, spreadsheets, and presentations. Its format support helps make switching from Microsoft Office straightforward, though it does not fix OneDrive or SharePoint synchronization behavior.

Frequently Asked Questions
Why does Robocopy report a file as changed when its timestamp is the same?
Robocopy can detect a difference in file size even when timestamps match. Use File Explorer Properties to compare sizes and PowerShell Get-FileHash to check whether the file bytes differ.
Does a larger file mean my document content was changed?
Not necessarily. Changes to package metadata or compression can affect size without an obvious change to visible content. Open both copies to review the document, and compare their hashes to check for binary differences.
Are all Office files changed by OneDrive synchronization?
Not necessarily. The reported behavior affected some DOCX, XLSX, and PPTX files, but it does not establish that every file or migration is affected. Test representative files in your own workflow.
How can I check whether a migration preserved a file exactly?
After synchronization completes, run Get-FileHash -Algorithm SHA256 in PowerShell on the original and the downloaded or synchronized copy. Matching hashes provide strong evidence that the file bytes are identical.




