Encrypt File Names on crypt google drive?

I have 2 seperate crypt google drives on 2 seperate accounts. Both have the same data but the gcrypt: does not have filename encryption and the gcrypt2: has the filename encryption=standard. Is there any way to rename gcrypt: files in accordance with gcrypt2: files or something else to make gcrypt: also filename encrypted without having to redownload and upload everything(without using much bandwidth).
I have 5.5 TB data on each drive.

I found something here but could not really understand the steps that @calisro gave : Is there any way to "rename" all files to the new Encryption "obfuscate"?

I’ve never tried it. But what I was saying was essentially if all you need to do is rename, you just need a list of what they are now and list of what they need to be and use the move command.

oh ok…ill try to figure it out…
do you know a way to get list of files with encrypted name and normal name side by side from a drive.
If so I can simply do that on my crypt remote which already has filename encryption and then use the move command to rename files on remote which does not have encryption

Try this link

Was able to get List of files with normal name and encrypted name using this. But couldnt understand how to use move command to rename files.

Rclone move remote1:some/file remote1:<encrypted>/<name>   

I’d make sure it works with a few files and are readable by the encrypted remote before you start writing a script though.

what should be the format for the json file which I have extracted?
the file which has normal name and encrypted name

I’m not sure what you mean. You’re just using this to feed into a script to parse it so you can generate the move commands. Depends on how you want to script it.

oh all right. I will have to create a script myself. I thought rclone could do this automatically. I can try to make the script have basic programming knowledge. Lets see.

rclone doesn’t currently do this itself. Looking at this, i’d like to see the encrypted path also added to the lsjson command. If that was there, this would be far easier to script. Currently you can only get the regular path which will make it more difficult to generate.

Can do it folder by folder then if I am able to make the script. Still better than copying everything again.

@ncw What do you think of adding the encypted path to the lsjson?

Created an issue for this.

If the encrypted path can be added, it would just take a few lines of code to create a full move script I believe. Simply parse each json line and generate move commands.

Doesn’t the --encrypted flag do this already? Or maybe I’ve mis-understood!

Hi. No. This is the difference:


Without the addition of the path, we only know the encrypted name and not where that actually exists in the encrypted tree.

The field ‘encrypted’ from the json output is simply the file or directory name:
item.Encrypted = cipher.EncryptDirName(path.Base(entry.Remote())

Of course, this would only be relevant if someone uses that switch though.

I was testing this out and I first renamed 1 file. But I am unable to see the file if I mount the remote with standard file name encryption turned on. I can see the file with it turned off but then the file is encrypted. Any suggestions :confused:

I don’t know for sure if the encryption is different of the actual file between the methods. I would have guess that as long as you’re using the same key it would have worked but I’ve never tried it. If you don’t see it and you’re only toggling the two then likely they are different.

I figured it out. I was doing rename from crypt remote to crypt remote when I should have done it from basic drive remote to drive remote.
Only issue I am facing is if I mount a folder once(with filename encryption) but without renaming the files it shows me no files even after I rename the files, but changing the name of the folder itself does the trick.
Probably something to do with rclone keeping a copy of directory contents in cache or something.

Oh, I see - thanks