Fix OneDrive Migration Creating Duplicate Files with Tilde Prefixes
Question details
Users experience duplicate file creation with tilde prefixes and lose original file metadata when migrating from a local file server to OneDrive.

- Product
- OneDrive / SharePoint Migration Tool
- Device & OS
- not provided
- Scenario
- Migrating files and folders from a local network file server to OneDrive for Business.
- Observed behavior
- Duplicate files prefixed with a tilde (~) appear outside their original folders. Additionally, original file metadata (such as modified date and editor) is lost and replaced with the migration account's details.
Ensure you have administrator access to both the local network file server and the target Microsoft 365 tenant. It is highly recommended to export a complete list of your current file metadata before applying any automated fixes or scripts.
Preserve Metadata using Custom Columns and Power Automate
Since standard migration tools cannot reliably preserve all local metadata, use custom SharePoint columns and a Power Automate flow to map and restore the original details.
Network shared folder metadata differs significantly from OneDrive for Business site metadata. Automated migration scripts often overwrite the original editor and date with the migration account's details.
Use a script or directory export tool to extract the original file metadata (such as 'Last Modified Date' and 'Last Modified By') from your local network drive to a CSV file.
Navigate to your target OneDrive or SharePoint document library. Click 'Add column' to create new custom text columns (e.g., 'Local Last Modified Date' and 'Local Last Modified By') to hold the original information.
Build a Microsoft Power Automate flow or use a PnP PowerShell script to read your CSV export and systematically update the newly created custom columns for each migrated file.

Resolve Tilde-Prefixed Duplicate Files
Review the migration tool settings and scan logs to prevent temporary or hidden local files from being duplicated during the migration process.
Looking for a simpler way to manage your office documents?
Dealing with complex Microsoft 365 migrations and lost file metadata can be frustrating. If you need a hassle-free, lightweight solution for your document management, WPS Office offers a powerful, free alternative. It provides seamless compatibility with Microsoft formats without the heavy administrative overhead.

Frequently Asked Questions
Why does the SharePoint Migration Tool create files with a tilde (~) prefix?
Tilde-prefixed files are typically temporary or hidden lock files generated by Microsoft Office when a document is open on the local file server. If the migration tool's settings do not properly exclude hidden files, it will migrate these temporary files alongside the originals, resulting in what appears to be duplicates.
Why do my migrated OneDrive files show the migration account as the author?
Network shared folder metadata differs from OneDrive for Business site metadata. Automated migration scripts upload files using the administrator's credentials, which inadvertently overwrites the 'Modified By' and 'Last Modified' columns with the migration account name and the current date.
Can I prevent metadata loss without using Power Automate?
While standard Microsoft migration tools attempt to preserve metadata, they are not always 100% reliable for local-to-cloud transfers. Advanced third-party migration tools or complex PnP PowerShell scripts can sometimes map metadata automatically, but using Power Automate to update custom columns post-migration is the most flexible native workaround available.




