1

Google Drive weirdly allow files/folder with the same name in the same location. This led that I have a lot of duplicate files/folders in my drive that I don't know any way to merge them. How to merge them and prevent this in future?

OneDrive does not allow duplicate file name that totally makes sense. Any way to make GDrvie function as expected?

1

You mention:

Google Drive weirdly allow files/folder with the same name in the same location.
How to merge them and prevent this in future?

weirdly
It is NOT weird. Google Drive keeps track by file/folder ID and NOT by name. As a result files/folders can have the same name.

prevent this in future
It is up to you to properly rename them when uploading/creating them.

merge
You cannot merge them as such. There is no such action. At least not within the drive.

A workaround

What drive allows for non-Google files is versions

enter image description here

This way you can upload different versions of the same file.

enter image description here

More info at: View activity and file versions


EDIT

In any case, you can send a request to Google using the help found on the top right hand corner.

enter image description here

| improve this answer | |
  • Please remember that as per site guidelines when an answer addresses your question, accept it and even upvote it so others can benefit as well. – marikamitsos Jul 20 at 5:40
  • Trust my, it's so so weird. I need GDrive to use the filename as ID, similar to local storage. Is there any way to fix that mess? – PHPst Jul 20 at 23:13
  • "I need GDrive to use the filename as ID". As explained in my answer, what you ask for cannot be done. Local storage or Drive One (as mentioned in your edit) have a different way of archiving than GDrive. In any case, since your question has been answered -even if in a negative way- please accept it so others can be helped as well. – marikamitsos Jul 21 at 21:24
  • I really appreciate your attempt. You "answer" just repeat the question. There should be a way to remove duplicate in an efficient way. So let open it to get more opinions. – PHPst Jul 21 at 22:55
  • 1
    In your question you asked for "How to merge them and prevent this in future?". Not remove. In your comment you asked for something else. "I need GDrive to use the filename as ID". If you just want to remove your existing duplicate files you could try a script to list them and then delete them. This script may be of some help. I hope someone else chips in. – marikamitsos Jul 21 at 23:49
1

As marikamitsos notes, it's intended behavior. A de-duplication app or script should be able to deal with the problem. There are many, but it depends on your OS which can run. I haven't found a really good one. To me that means one that can understand and make use of hard links, and is quite customizable. So all I've done is write some shell commands I haven't worked into a script yet to replace a duplicate file with a hard link to the same file. Also, as you have different versions, the problem is tougher, and situation and document-dependent. Word is good at merging documents it can handle. Maybe you want the older files deleted; maybe something else. I run something like this crap to find dupes in Downloads folders from people who unintentionally download the same thing repeatedly:

cat crc32s.txt >> crc32s.old.txt ; time crc32 * > crc32s.txt ; \
cat crc32s.txt  crc32s.old.txt | \
sort --key=1 | uniq -u | \
sort --key=2 | uniq -d -f 1 | tee crc32s.changed.txt 

There should be FAR better solutions out there... (and there are many alternatives to crc32, such as md5 and sha.)

It sure is weird! I can't think of an OS that does. NOT DOS, Win32, HFS,APFS(MacOS), NFS, ext3, or AFS, as I recall. MacOS has time machine, which allows versioning, as does Google Docs, etc. But "two files with the same name in the same folder"? (No, not a different extension? Nope.) Sure is odd. And, if the two files are identical, it still stores them separately, using double the space! According to the UI anyway!

I have "two files with the same name in the same folder in Google Drive" and was wondering if that's a feature or a bug too.

I googled that phrase and the only thing that turned up was a deleted superuser.com post but now this Q&A will turn up.

I'm also curious what happens if I have my google drive sync'd (w/ "Backup and Sync") to my local drive, where this can't happen Like the OP, I copied a file into a folder that already contained the file and now there are two copies. I've seen this a few times.

| improve this answer | |
  • 1
    I too upvote your because it explains the "oddity" of the situation. Especially since "I googled that phrase ... now this Q&A will turn up." I am also interested on "what happens if I have my google drive sync'd...". Please try it out using test folders/files and let us know. – marikamitsos Sep 14 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.