List/find and replace/rename option?

Hello,
I am trying to rename files with illegal characters from my dropbox account.
So for example files that include a colon, :, I can list the files with ls --include "*:*" but is there a way to run another command to use the copyto command to rename them?

Or would I need to do rclone copyto --include "*:*" remote:folder/ remote:/folder/newfilename
But there is no way I can think of that would allow for rclone just to remove the ":" and leave the rest of the filename alone.

Am I missing a solution somewhere? Like in serve or the rc option?

Thank you for your time and for rclone it helped me a lot in the past :pray:

What is the problem you are having with rclone?

Consecutive commands possible? Search and rename/replace?

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

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

Dropbox

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone ls --include "*:*" remote:folder/ 

The rclone config contents with secrets removed.

Not relevant (I assume)

A log from the command with the -vv flag

2022/05/10 13:58:46 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "-vv"] 

How do you define an illegal character?

I'm sure there are quite the number of ways to do it as I tend to use rename on a mount assuming you can see them in a mount.

felix@gemini:~$ touch "test:blah"
felix@gemini:~$ ls -al test*
-rw-rw-r-- 1 felix felix     0 May 10 08:10 test:blah

and

felix@gemini:~$ rename -e 's/\:/\-/g' test*
felix@gemini:~$ ls -al test*
-rw-rw-r-- 1 felix felix     0 May 10 08:10 test-blah

"How do you define an illegal character?"

Based on this?

The remote is not mounted, but I did not think of that, to run unix commands against a mounted remote, because I am on windows, I probably can use WSL2 to access the mounted system on the Windows side.

If it's illegal, you can't upload it to dropbox so it would not ever be there to find/fix, no?

You want to fix illegal characters on the source then I'd imagine as you had stated:

Which I don't think is possible since they can't get there. You want the source system.

I know in theory, but there are literally hundreds of files that where uploaded or synced there or renamed, with illegal filenames on the Dropbox. They are definitely there.
I am trying to prove it with rclone ls --include "*:*" n:/meemoo-Team/ > rclonelog-colon.log | wc -l
But I am stuck for now, too many requests "Too many requests or write operations. Trying again in 300 seconds.".

Hmm, that's strange.

I can't upload an illegal character, but I can rename a file with an illegal character which is puzzling to me.

More grim: The link for the bad files check is not working. - Dropbox Community (dropboxforum.com)

but that did lead me to:

davidcruy/bad-files-check: Console application that performs a bad files check with Dropbox API. (github.com)

Maybe give that a whirl?

I noticed the link not working before as well, sucks, the notification still shows up when trying to sync files.

(I can prove now they are actually there in mass (485 files)

I will try the tool you linked, I thought I could do it with Rclone, seemed logical to me :stuck_out_tongue:

Thanks again for you help legend!

The only characters dropbox can't use are listed here

$ rclone help flags dropbox.*enc
Backend Flags:
      --dropbox-encoding MultiEncoder   The encoding for the backend (default Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot)

So you can have pretty much any character on dropbox except / and \

If you want more characters escaped on upload then you can add to the list for --dropbox-encoding