Fix OneDrive Creating Duplicate Files Folders
In this article
If OneDrive is creating duplicate files or folders on your Windows PC, the fix usually involves stopping sync, clearing the OneDrive cache, or resolving filename conflicts. Start by pausing sync, then check for the most common causes like nested folders, offline files, or a corrupted cache.
Why OneDrive Duplicates Files
OneDrive duplicates files for several reasons, and understanding them helps you choose the right fix. The most common cause is a sync conflict: when a file is edited on two devices while OneDrive is offline, it keeps both versions and adds "(1)" or your device name to the copy. Another cause is having the same folder synced through both your personal OneDrive and a work or school account, which can create two separate copies. Additionally, if you move folders around while sync is paused, OneDrive may treat them as new content and re-upload them, resulting in duplicates. Finally, a corrupted OneDrive cache—the local database that tracks file states—can cause the client to lose track of what it has already uploaded, leading to re-uploads.
How OneDrive Sync Works
OneDrive uses a local cache folder (usually under %LocalAppData%\Microsoft\OneDrive) to store metadata about your files. When you change a file, the client compares its local state with the cloud and uploads the difference. If this cache becomes corrupted or if the sync process is interrupted (e.g., by a system crash or network drop), OneDrive may not recognize that a file already exists in the cloud, so it creates a duplicate. Similarly, when you edit a file on two devices while offline, OneDrive cannot merge the changes, so it keeps both versions—one as the original and one with a suffix. This is by design to prevent data loss, but it can be confusing.
How to Fix Duplicate Files and Folders
Follow these steps in order. Stop when the issue is resolved.
- Pause syncing – Right-click the OneDrive cloud icon in the system tray and select "Pause syncing" for 2 hours. This stops new changes from being uploaded while you work.
- Check for sync conflicts – Open the OneDrive folder in File Explorer. Look for files with names like "filename (1).docx" or "filename (your PC name).docx". These are conflict copies. Open both, merge the changes manually, then delete the duplicate.
- Remove duplicate folders – If you have two folders with the same name, compare their contents. If one is an older copy, move the files you need into the main folder and delete the duplicate.
- Reset OneDrive – Press
Win + R, typeonedrive /reset, and press Enter. This reinitializes the sync client without deleting your files. Wait a few minutes for it to re-sync. - Clear the cache – If reset doesn't work, close OneDrive completely (right-click the tray icon > Exit). Then open File Explorer and navigate to
%LocalAppData%\Microsoft\OneDrive. Delete the contents of thecachefolder. Restart OneDrive—it will rebuild the cache and re-sync. - Check for duplicate sync locations – Open OneDrive settings (right-click tray icon > Settings > Account). Under "Choose folders," make sure you haven't selected the same folder twice. If you have, uncheck one.
Common Problems That Cause Duplicates
- Nested folders – If you have a folder inside another folder that is already being synced, OneDrive may sync it twice. For example, if you sync
Documentsand also haveDocuments\Projectsas a separate sync location, you'll get duplicates. - Offline editing – When you edit a file on a laptop while offline and then edit the same file on a desktop while online, OneDrive will keep both versions as separate files.
- File names with special characters – OneDrive doesn't allow certain characters like
" * : < > ? / \ |. If you have files with these, OneDrive may rename them and create a copy. - Multiple accounts – If you're signed in to both a personal and a work/school account, and you have the same folder in both, you'll see duplicates.
How to Prevent Duplicates in the Future
- Use "Files On-Demand" – This keeps files in the cloud and only downloads them when you open them. This reduces the chance of sync conflicts because you're always working with the latest version.
- Always go online before editing – If you're offline, wait until you're connected to sync before making changes. If you must edit offline, be aware that conflicts may occur.
- Keep a single sync location – Avoid syncing the same folder twice. Check your OneDrive settings and remove any redundant folder selections.
- Regularly check for conflicts – Once a week, search your OneDrive folder for files with "(1)" in the name and resolve them.
What to Do If the Fix Doesn't Work
If duplicates persist after resetting and clearing the cache, try these additional steps:
- Unlink and relink your account – In OneDrive settings, go to Account > "Unlink this PC". Then sign in again. This forces a fresh sync.
- Check for third-party antivirus interference – Some antivirus software locks files while scanning, which can cause OneDrive to think the file is new. Temporarily disable your antivirus to test.
- Use the OneDrive web app – Go to onedrive.com and check if the duplicates exist in the cloud. If they do, you can delete them there. If they don't, the issue is local.
- Contact support – If nothing works, use the OneDrive support chat (via the web app) to get help. They can run diagnostics.
Frequently Asked Questions
Why does OneDrive create a file with "(1)" in the name?
This happens when a file is edited on two devices while OneDrive is offline. OneDrive keeps both versions to avoid data loss. You need to manually merge the changes and delete the duplicate.
Can I delete the duplicate files safely?
Yes, but first open both files to make sure you don't lose any changes. If the duplicate is an older version (check the modified date), you can delete it. If you're unsure, move it to a backup folder.
Does resetting OneDrive delete my files?
No. Running onedrive /reset only reinitializes the sync client. Your files remain on your hard drive and in the cloud. After reset, OneDrive will re-sync everything.
Why are my folders duplicated after I moved them?
If you move a folder while OneDrive is paused, the client may not recognize the move and will upload it as a new folder. To avoid this, always move folders while OneDrive is running and synced.
Does this happen on Mac too?
Yes, OneDrive for Mac can also create duplicates, but the fix steps are slightly different. On Mac, you can reset OneDrive by quitting it and running killall OneDrive in Terminal, then reopening it.
Will using "Files On-Demand" prevent duplicates?
It reduces the chance of conflicts because you're always working with the latest cloud version. However, it doesn't eliminate duplicates caused by multiple accounts or nested folders.