How to delete several files (crypt-enabled) in a row on the remote side?

I tried try this rclone purge Safe:MBP/.* or rclone delete Safe:MBP/.* to remove files beginning with a dot on a crypt volume sitting on the remote side. I did a mistake writing my filter (I forgot to activate dry-run) and now, I must pay for it by manually deleting them one by one as it's not, surprisingly, that easy deleting files in a row with rclone. I'm not a shell-script Ninja as I can't write any script under 2 minutes to automate things quickly.

Thanks for your help.

You can just delete like this:

Rclone delete Safe:MBP --include='**/.*' which will delete any files starting with a dot. If that's what you're looking for. Use --dry-run to test.

I tried the command, but not doing what I expect since my failure to be as accurate as possible in my question.

Here's what I have :slight_smile:

$ rclone lsd Safe:MBP/ --include '\.'
          -1 2019-06-02 13:28:24        -1 .config
          -1 2019-06-02 13:28:23        -1 .fontconfig
          -1 2019-06-02 13:28:29        -1 .gem
          -1 2019-06-02 13:28:16        -1 .lftp
          -1 2019-06-02 13:28:41        -1 .oh-my-zsh
          -1 2019-06-02 13:28:25        -1 .ssh
          -1 2019-06-02 13:28:24        -1 .tmux
          -1 2019-06-02 13:28:26        -1 .vim
          -1 2019-06-02 17:03:58        -1 ABI
          -1 2019-06-02 17:03:58        -1 B
          -1 2019-06-02 17:03:57        -1 Captures
          -1 2019-05-29 20:13:54        -1 Documents
          -1 2019-06-02 12:00:21        -1 Downloads
          -1 2019-05-29 20:20:46        -1 Library
          -1 2019-05-30 13:30:24        -1 RT
          -1 2019-06-02 17:03:57        -1 Sites
          -1 2019-06-02 17:03:58        -1 Thinker
          -1 2019-06-02 17:03:58        -1 UX
          -1 2019-06-02 17:03:58        -1 bin

Already, I have an issue listing only items beginning with a dot at the root of the crypt volume. Inserting --include '\.' still lists everything. How do I ask rclone listing only items beginning with a dot at the root.

I'd like to find the right option combination to remove those directories beginning with a dot at the root of the listing. I don't want to remove recursively dot files inside other folders.

I tried as many combinations as possible using --max-depth 1 and --include with the latter defined as follows: /.* or /.*/ or .*/

Let's express myself in REGEX. If I want to remove what I want:

rclone delete --max-depth 1 --include "\..*/"

That would be so much logical for me, but not understandable by rclone.

Rclone delete Safe:MBP --include='/.*'

Try with
Rclone lsl Safe:MBP --include='/.*'

Ah wait. Those are directory

For directories:

Rclone delete safe: --include=/.*/**

Thanks for your time and prompt answer. Everything perfect! Problem solved.

And this last bit to only list dot directories from root folder:

$ rclone lsd Safe:MBP --include='/.*/**'


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