What Causes OneDrive to Duplicate Files?
OneDrive duplicates files when it cannot automatically reconcile two versions of the same file. Rather than risk data loss by overwriting one version, it saves both — appending a suffix like -Copy, (1), or the device name (e.g. Filename-DESKTOP-AB12.docx) to distinguish them. There are four primary causes.
Cause 1 — Sync Conflicts Between Two Devices
If you open and edit a file on your desktop while a colleague (or your laptop) simultaneously edits the same file, OneDrive cannot merge the changes automatically for most file types. When the second save lands in the cloud, OneDrive creates a conflict copy. The duplicate is tagged with the device name or the suffix (version conflict).
This is most common with files that are not co-authored natively — for example, .xlsx files opened with the desktop Excel app (not Excel Online), .pdf files, or any non-Office format. Microsoft 365 co-authoring in Word and Excel Online resolves real-time conflicts automatically, so using the browser version significantly reduces this risk.
Cause 2 — Offline Edits Before Sync Completes
OneDrive marks files as cloud-only (the blue cloud icon) when local storage is managed by Files On-Demand. If you edit a file while offline — or while OneDrive has not finished downloading the latest cloud version — you are effectively branching the file. When your device reconnects, OneDrive discovers both versions differ and creates a duplicate rather than silently overwrite either copy.
The pattern to watch for: you return from travel, open your laptop, edit a file before the OneDrive tray icon finishes syncing (the rotating arrows), then reconnect to Wi-Fi. Within minutes a -Copy file appears.
Cause 3 — Known OneDrive Client Bugs
Certain OneDrive client builds have introduced duplication bugs, particularly affecting:
- OneNote notebooks — OneDrive and OneNote have separate sync engines that occasionally disagree on the authoritative version.
- Files with long paths — paths exceeding 260 characters (the legacy Windows MAX_PATH limit) can confuse the sync engine even when long path support is enabled.
- Files containing special characters — characters like
#,%,&in filenames are valid in Windows but cause issues with OneDrive's URL-encoding logic. - Antivirus interference — real-time scanning that holds a file lock at the moment OneDrive writes can cause a failed write to be retried as a new file.
Always keep the OneDrive client updated. Check OneDrive tray icon → Help & Settings → About → Version and compare against the latest release notes at Microsoft's OneDrive release notes.
Identifying Which Copy Is Current
Before deleting any duplicate, confirm which version is authoritative. Open both files and compare the last-modified timestamp in the file's Properties dialog, or check the version history in OneDrive:
- Right-click the file in Windows Explorer (inside the OneDrive folder) and choose View online.
- Click the file name at the top of the page, then select Version history.
- Compare the last saved time and the editor name against the duplicate.
- The copy with the more recent timestamp and correct editor is almost always the one to keep.
Finding All Duplicates with PowerShell
For a OneDrive folder with hundreds of files, manual inspection is impractical. The script below scans your local OneDrive sync folder and reports any file whose name contains common duplication suffixes.
# Set this to your OneDrive root — adjust for OneDrive for Business if needed
$oneDrivePath = "$env:USERPROFILE\OneDrive"
# Patterns that indicate a duplicate
$patterns = @('-Copy', ' \(\d+\)', '-\w{8,}-\w{4,}')
Get-ChildItem -Path $oneDrivePath -Recurse -File | Where-Object {
$name = $_.BaseName
($patterns | Where-Object { $name -match $_ }).Count -gt 0
} | Select-Object FullName, LastWriteTime, @{
Name = 'SizeMB'
Expression = { [math]::Round($_.Length / 1MB, 2) }
} | Sort-Object LastWriteTime -Descending | Format-Table -AutoSizeTo export the results to a CSV for review before deleting anything:
Get-ChildItem -Path $oneDrivePath -Recurse -File | Where-Object {
$name = $_.BaseName
($patterns | Where-Object { $name -match $_ }).Count -gt 0
} | Select-Object FullName, LastWriteTime, Length |
Export-Csv -Path "$env:DESKTOP\OneDrive-Duplicates.csv" -NoTypeInformation-Copy file may contain edits that have not been merged into the primary file. Always open both, compare content, then delete the unwanted version.How to Resolve an Active Conflict
When OneDrive detects an active conflict, a red X or orange badge appears on the file. To resolve it:
- Click the OneDrive tray icon and look for the Sync issues or Activity panel — conflict files are listed there with a Resolve link.
- Clicking Resolve opens both files side by side in Explorer so you can compare and choose which to keep.
- Copy any unique content from the duplicate into the primary file, then delete the
-Copyversion. - Wait for OneDrive to sync the deletion before closing the session.
Preventing Future Duplicates
- Always wait for the OneDrive tray icon to show Up to date before going offline or putting your device to sleep.
- Use Office files in co-authoring mode (browser or signed-in desktop app) instead of exclusive desktop locks.
- Avoid filenames with
#,%,&, or paths longer than 255 characters. - Keep the OneDrive client on the latest build (auto-update is on by default; confirm in Settings → About).
- For shared libraries, use SharePoint document libraries with check-in/check-out enabled for files edited exclusively (e.g. PDFs, InDesign files).
- If antivirus is flagging OneDrive folders, add the OneDrive sync root to the AV exclusion list.
Need Help?
Melbits manages IT for Melbourne businesses and can audit your Microsoft 365 environment to identify recurring OneDrive sync issues, misconfigured clients, and policies that lead to duplication. We also deploy Intune-managed OneDrive configuration profiles that prevent the most common causes automatically. Contact us to book a review.