Duplicate Folders (2)

How do duplicate folders (With a (2)) get created, and how can you resync? I have a situation where there are two folders, one with (2) which does not exist on Google drive, and two folders have different files in them. How do you get rid of the (2) folder and make sure it is synced?

@B22: Apologies for the trouble. Assuming you have folders named folder and folder (2), you can try these things:

  • Run diff -r folder folder\ \(2\) to check the files that are different between the two folders. If there are only a few of them you can check each of them manually and select the ones you want to keep, then delete the duplicate folder.
  • If the command above shows a lot of differing files, you may want to copy files to the correct folder only if they are newer. To do that, you can run cp -u folder\ \(2\)/* folder/.

As a precaution you should backup folder first in case you accidentally overwrite a file inside it with the wrong one. Hope this helps.

Thanks lpugoy, I will try that, I don’t want to impact the files on google though. As a bit of background, I think the problem started when I accidently clicked and dragged the folder to my desktop, then moved it back. I’m not sure what mechanism in nsync creates a (2) directory for me, but not anyone else.