ContextCleaner: see every entry in the Windows 11 right-click menu, and which app added it — on the Microsoft Store.
Windows Tips & Tools DupeDoctor

OneDrive Duplicate Files With Your Computer Name: Why They Appear and How to Clean Them Up Safely

Published October 21, 2026 Updated October 21, 2026 8 min read

When OneDrive creates a copy of a file with your computer name added, such as book1-desktop-computer.xlsx next to book1.xlsx, Microsoft says the usual cause is expired cached sign-in credentials, and the fix is to clear them and restart OneDrive. That stops new copies, but it does not remove the ones already there, and some of them may contain edits the original does not. DupeDoctor from Automata Labs separates the two cases: it confirms true byte-for-byte copies with a content hash so you can recycle them safely, and anything it does not group is a version you should compare before deleting.

Find the true copies, keep the originals, and recycle the rest safely.

Get it from Microsoft

Why does OneDrive add my computer name to files?

Microsoft’s support article Duplicate files in OneDrive gives the short answer: “If a file is duplicated in your OneDrive with your computer name added to the filename, it could be time to refresh your credentials.”

A companion article, Clear OneDrive cached credentials, describes the symptom with an example. When credentials on the computer have expired, “A duplicate file is created with your computer name added to the filename, for example: book1.xlsx book1-desktop-computer.xlsx.”

In effect, OneDrive could not confidently match your local file with the cloud copy, so instead of overwriting anything it kept both and labeled the local one with the PC name. That is a safe choice for your data, and an annoying one for your folders.

Both Microsoft articles are listed as applying to OneDrive for Business, so if you use a personal account and the fix below does not help, the cause may be different.

How do I stop OneDrive from creating these duplicates?

Microsoft gives these steps for Windows, in order:

StepWhat to doSource
1. Clear saved credentialsOpen Credential Manager, select Windows Credentials, and under Generic Credentials remove entries containing “MicrosoftAccount” and your username. Restart OneDrive.Duplicate files in OneDrive
2. Clear the pre-sign-in settings filePress Windows key + R, enter %localappdata%\Microsoft\OneDrive\settings, and delete PreSignInSettingsConfig.json.Clear OneDrive cached credentials
3. Reinstall OneDriveIf the problem continues, uninstall and reinstall OneDrive.Both articles

On reinstalling, Microsoft adds a reassuring note: “You won’t lose files or data by disabling or uninstalling OneDrive on your computer. You can always access your files by signing in to OneDrive.com.”

Do this first. If you clean up the duplicates while the cause is still active, OneDrive may simply make new ones.

Are the computer-name copies identical to the originals?

Not always, and this is the part most guides skip. A computer-name copy exists because OneDrive was not sure the two files matched. Sometimes they are identical. Sometimes the copy holds edits you made on this PC that never reached the cloud, or the original holds edits made elsewhere.

What you findWhat it meansWhat to do
Copy and original have identical contentsA true duplicateSafe to recycle the copy
Same name pattern, different contentsTwo versions of the fileOpen both and merge or choose
Copy exists, original does notThe copy may be the only versionKeep it and rename it

Deleting by file name alone, for example everything ending in your PC name, risks throwing away the only copy of recent work. You want to check contents, not names.

How do I find which copies are true duplicates?

You need a tool that compares file contents. DupeDoctor does this by design. According to its Microsoft Store listing:

  • Exact duplicates are confirmed by content, not by name or size. A quick size grouping prunes obvious non-matches, then a BLAKE3 hash verifies true byte-for-byte copies, “so renamed files are still caught and there are no false positives.”
  • One-click auto-keep rules (keep newest, oldest or shortest path) pre-select the redundant copies in exact-duplicate sets, with a running reclaimable meter, undo and clear.
  • At least one file in every duplicate set is always kept. The app will not let you empty a group.
  • Deletion always goes to the Windows Recycle Bin, and there is no permanent-delete path.
  • Move instead of delete: send selected extras to a folder you choose.
  • Export a full report of everything found as CSV or JSON.
  • 100% offline: no network client, no telemetry, no account.

The useful side effect for this problem: if a computer-name copy does not appear in an exact-duplicate set with its original, its contents differ. That is your list of files to open and compare by hand.

Let content hashes decide what is a duplicate, not file names.

Get it from Microsoft

What should I watch out for when cleaning a OneDrive folder?

Online-only files. Microsoft’s Files On-Demand article says that since OneDrive build 23.066, Files On-Demand is on by default, and an online-only file “doesn’t download to your device until you open it.” Any tool that compares contents has to read the file, so scanning a folder full of cloud-only files can download them. Either scan folders that are already available on this device, or make the folder available offline first and expect it to use disk space.

Deletions sync. Your OneDrive folder is connected to the cloud. Microsoft notes that “When you delete an online-only file from your device, you delete it from your OneDrive on all devices and online,” and that you can restore deleted items from the OneDrive recycle bin on the web “for up to 30 days” for personal accounts, or up to 93 days for work or school accounts. Recycling a duplicate is recoverable, but it is not local-only.

Office files that are open. If a document is open in Word or Excel, OneDrive and other tools may not be able to move or delete it. Close it first. If something still holds it, see OneDrive file in use, cannot delete.

What is a safe cleanup routine?

  1. Fix the cause using Microsoft’s credential steps above, and restart OneDrive.
  2. Wait for sync to finish so OneDrive is not still writing new copies.
  3. Make the affected folder available on this device, or pick a folder whose files are already local.
  4. Scan it with DupeDoctor. Review the exact-duplicate sets that pair a computer-name file with its original.
  5. Use an auto-keep rule carefully. When both files sit in the same folder, the original name is the shorter path, so the keep-shortest-path rule usually keeps book1.xlsx and selects book1-desktop-computer.xlsx. Check each set before you recycle.
  6. List the leftovers. Any computer-name file that was not grouped has different contents. Open it next to the original and decide which to keep.
  7. Export the report so you have a record of what you removed.

For general guidance on deleting duplicates without regret, read how to safely remove duplicate files on Windows 11. The same approach also works for the other common pattern, “file (1)” copies, which we cover in cleaning up file (1) copies in Downloads.

Frequently asked questions

Why does OneDrive create a file with my computer name?

Microsoft says it usually means your cached credentials have expired. OneDrive keeps both files rather than risk overwriting one.

Can I just delete every file with my computer name in it?

Not safely. Some of those files may contain edits the original does not. Check contents first, and only remove the copies that are byte-for-byte identical.

Will deleting the duplicates delete them online too?

Yes. Changes in your OneDrive folder sync. Microsoft says deleted items can be restored from the OneDrive recycle bin on the web for a limited time.

Does DupeDoctor upload my files?

No. Its Store listing says it has no network client, no telemetry and no account.

Can DupeDoctor permanently delete files?

No. Its listing says deletion always goes to the Windows Recycle Bin.

Try DupeDoctor

Get DupeDoctor from the Microsoft Store. It is a one-time purchase with no subscription, and the Store listing shows the current price.

Clear the computer-name copies that really are copies, and keep everything else.

Get it from Microsoft

Microsoft, Windows and OneDrive are trademarks of the Microsoft group of companies. DupeDoctor is not affiliated with or endorsed by Microsoft.

Last updated 21 October 2026. Published by Automata Labs, a software company in Canada.

// release_radar

Get notified about new releases.

We build native, local-first tools for professionals who refuse SaaS fatigue. Drop your email to hear about new apps, major updates, and zero-telemetry releases as they land on the Microsoft Store. No spam — just release news.