Rclone cryptdecode on multiple files?

What is the problem you are having with rclone?

Trying to run rclone cryptdecode --reverse on multiple files (with a filter):

rclone cryptdecode --reverse gdrive-crypt: pictures/ --include '*.png'

but it outputs only the the pictures directory instead of it's files.

pictures       7814ergse8h3f48ojkh

You can run it in a loop:

rclone_remote=gdrive-crypt:; rclone_path=pictures; for i in $(rclone lsf $rclone_remote$rclone_path | grep -i png); do rclone cryptdecode --reverse $rclone_remote $rclone_path$i; done

and it works but it gets complicated the more you develop this way.

By the way, I know that this has been discussed before, but I think that it would be great if rclone supported simple glob patterns like:

rclone cryptdecode --reverse 'gdrive-crypt:pictures/*.png'

Run the command 'rclone version' and share the full output of the command.

rclone v1.62.2
- os/version: arch "rolling" (64 bit)
- os/kernel: 6.3.9-arch1-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.4
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The rclone config contents with secrets removed.

type = drive
client_id = <REDACTED>
client_secret = <REDACTED>
scope = drive
token = <REDACTED>
root_folder_id = <REDACTED>
team_drive = 

type = crypt
remote = gdrive:crypt
password = <REDACTED>
password2 = <REDACTED>

A log from the command with the -vv flag

rclone cryptdecode --reverse gdrive-crypt: pictures --include '**/*.png' -vv
<7>DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "cryptdecode" "--reverse" "gdrive-crypt:" "pictures" "--include" "**/*.png" "-vv"]
<7>DEBUG : rclone: systemd logging support activated
<7>DEBUG : Using config file from "/home/user1/.config/rclone/rclone.conf"
pictures       7814ergse8h3f48ojkh
<7>DEBUG : 2 go routines active

Filters are not implemented for rclone cryptdecode.

I am afraid that if you need it you have to write it yourself - as I do not expect many people need it.

And again what is the problem you are trying to solve? Or just poking around commands and flags?:slight_smile:

1 Like

Thanks, that makes sense.

I was planning to use that list to copy files between two remotes on a server that doesn't have decryption password, so can only move encrypted file names. The idea was to feed it something like:

encrypted_files=$(rclone_remote=gdrive-crypt:; rclone_path=pictures; for i in $(rclone lsf $rclone_remote$rclone_path | grep -i png); do rclone cryptdecode --reverse $rclone_remote $rclone_path$i; done)

ssh admin@server for f in $encrypted_files; do rclone moveto remote1:$f remote2:$f; done

Still I might be very wrong with my assessment that this feature is not something people look after. If you have clear idea what it should be it is worth to post it under "Feature" category. Who knows maybe somebody will be happy to implement it. Beauty of open source:)

1 Like

I hope so, submitted: Filters in rclone cryptdecode

1 Like

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