Gdrive Duplicate folders and sample how to Recreate

How to deal with Duplicate folder names with rclone and GDrive?

Many people including myself have asked this question in the past but no one including myself gave detailed explanation on HOW to replicate it so I will now

Here is 1 such question:
https://forum.rclone.org/t/rclone-dedupe-only-some-folders/23833

We all know GDrive allows duplicate files and even folder names!

Personally I feel this is a major flaw on Google's Part

Let me explain HOW easy it is to create duplicate folder names

STEP 1
On Windows I did this inside a folder mounted with GDrive Desktop APP:
mkdir 100\A
mkdir 101\A
mkdir 102\A
mkdir 103\A
mkdir 104\A
mkdir 105\A
mkdir 106\A
mkdir 107\A
mkdir 108\A
mkdir 109\A
mkdir 110\A
mkdir 111\A
mkdir 112\A
mkdir 113\A
mkdir 114\A
mkdir 115\A
mkdir 116\A
mkdir 117\A
mkdir 118\A
mkdir 119\A
mkdir 120\A

Once those were made, I used
https://drive.google.com/drive/shared-drives

To move the A folders out of the numbered ones into the parent

Anyone who uses drive.google.com to move files or folders can easily create duplicate file name and even folders.

Other tools out there like GClone/Auto Rclone, etc also do this. For some odd reson tools like Gclone can say create unlimited Duplicate folder names, sometimes the content in every folder is exactly the same, other times you can have say 20 or more folders where each folder has PART of what is supposed to be in the main folder

Meaning for example say 1 file in every folder that is supposed to be inside a single folder

So back to the process to replicate what I am showing:
After doing STEP 1 above

Goto drive.google.com and view the folder it will look like this:
https://gcdnb.pbrd.co/images/vQL25NI7zUaH.png

In Windows explorer it looks like this:
https://gcdnb.pbrd.co/images/AoxWtw4Jn1aL.png

With rclone lsd this is how it looks:
https://gcdnb.pbrd.co/images/AxUqQaEuXMJx.png

Now with rclone if you try and move those directories and contents rclone will give some error message like skipping duplicate folder or something like that

Using dedupe will not help either unless I am missing something in a lot of cases, I think it skips the duplicate names as well.

I cannot remember IF it actually checks the md5 of files inside duplicate folder names or not.

But even if it does, that may be a no help when say there are 20 duplicate folder names, where there is only 1 unique file in each folder with different names and md5 values etc

So the question is if there is an "easy" fix with rclone to be able to say MERGE duplicate folder names?

So as an example rclone could do this:

rclone --merge REMOTE:/
or
rclone --merge REMOTE:/PATH

When someone invokes the --merge flag it knows only to find duplicate folder names and merge them into the first named folder.

I have seen some Folders where the (1) or (2) etc are not at the end of the folder too on Windows but wsomewhere in the middle.

But that should not matter to rclone since it literally see's ALL the duplicate folder names as exactly the same name as shown above.

I hope this helps clarify what many have tried to ask in the past.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.