OneDrive and SharePoint sync issue: “You now have two copies of a file; we couldn’t merge the changes in [filename]” appended with computer name

couldntmergechanges

If you’ve seen a similar notification, I empathize with your pain. I don’t know that there is one solution to this problem, either, so I’m going to share a number of them we’ve used and hope that one (or all) of them will help you.

Basically a file is added through file explorer (a cloud library in OneDrive or SharePoint being synced locally to your computer) but then after a moment a notification appears which says “You now have two copies of a file; we couldn’t merge the changes in [filename]” and then the filename is appended with your computer name again and again until eventually the filename is too long and is harder to delete. Let’s not get to that point.

Two issues we’ve found:

  • File Size
  • SharePoint Workflows

We’ve only run into this issue when the file in a frenzy is significant in size. Due to that size, and multiple people syncing the same library, I imagine it’s pinging back and forth as it downloads, copies, uploads, discovers a conflict, downloads, copies, etc. And many of the files you’re left with will oddly be corrupt 0 KB files. It becomes a bit of a game to try to actually delete the files, but I would suggest trying to delete the file from the browser, and not file explorer so you catch it upon creation and not after download. We eventually used workflow to help us delete any files created or changed with ComputerName-ComputerName-ComputerName in the title because if you’re not fast enough, the process will just continue its copy, download, upload cycle.

As for workflows, we noticed if we turned off workflows on the document library in question, we didn’t get the same issue. A workflow was trying to modify the large file while it was being downloaded through everyone’s sync client so it encountered a sort-of “save conflict” while syncing both ways. But, unfortunately, we needed the workflow more than we needed the convenience of easy uploads.

So, currently, our workaround for large files is to upload them via the browser, not file explorer. You can still edit and access the large files through file explorer just fine, but when you first add them, add them via your browser with drag-and-drop or the upload button. This way you can keep your workflows as they are and avoid the never-ending cycle of terror…I mean error.

Here are three other things you can try:

  1. Delete multiple versions of Office. For example, if you have Microsoft Office 2010 and 2016 on your computer, uninstall 2010.
    1. Click Start –> Settings –> Apps –> Microsoft Office (older version)
    2. Click uninstall on the old version and follow prompts
    3. Restart computer
  2. Repair your Office programs (make sure they’re up-to-date)
    1. Click Start –> Settings –> Apps –> Microsoft Office
    2. Modify
      modify
    3. Click “Yes” if asked to make changes to computer
    4. Click Quick Repair –> Repair
      quickrepair
      Note: Try Online Repair instead if you wish – this is basically like re-installing the programs and takes a while.
  3. Have everyone syncing that library delete their Microsoft Upload Center cache.
    1. Click Start –> Microsoft Office –> Office Upload Center
    2. Click Settings
    3. Delete cached files
      deletecache.PNG

And if none of those work, your other option is to have users stop using the sync client altogether for that library. Here’s how to stop syncing a library:

  1. Right-click the OneDrive icon in your system tray
    rightclickonedrive.png
  2. Click settings
    settings.png
  3. Under the “Account” tab, click “Stop Sync” next to the problem library, “Stop sync” again in the dialog to confirm, then OK
    Stop sync

4 Replies to “OneDrive and SharePoint sync issue: “You now have two copies of a file; we couldn’t merge the changes in [filename]” appended with computer name”

  1. I encountered this “you now have two copies…” error on just one computer. Previously, on another, I’d gotten a bunch of “path too long” errors (deep within the DICOM image data of MRI and CT images), and I noticed that a directory involved in the “you now have two copies…” was one of those DICOM image directories.
    I looked at the root of the OneDrive path on this one computer, and I noticed that it was slightly longer than on other of our computers, in part because this was in the %USERPROFILE% directory of a user _to whom a directory had been shared in OneDrive_. So, what was:
    C:\users\userone\OneDrive – %ORGANIZATION%\%FOLDER%\
    on the other computer, on this computer appeared as the slightly longer:
    C:\users\usertwo\OneDrive – %ORGANIZATION%\%USERONE% – %FOLDER%\
    just enough longer to hit OneDrive’s (inconceivable, Microsoft, fix this!) much-shorter-than-Windows-NTFS path limit.
    I unlinked the computer, moved the OneDrive storage location from %USERPROFILE% to C:\OD\, re-linked, _AND THE PROBLEM WENT AWAY_.

    So, if you’re seeing “you now have two copies…” look to see if you’ve got any data in the trying-to-sync-to-the-problem-computer which, taking into account the root of the OneDrive storage path, and possibly a %SharedByOtherUserName%- prefix, hits OneDrive’s path length limit.

  2. Odd. The files on which I am getting this error are less than 200 kB in size. I didn’t think that was something that would overly stress a OneDrive server. It’s also a non-shared folder, so the workflow should be fairly simple. However, MS still keeps giving me this error.

Leave a Reply to dhknlCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.