Delete folder with name "_gsdata_"

Hello,

I am looking for a way to delete all folders with the name of _gsdata_ and all files with the name .DS_Store

I tried it this (and multiple other) ways:

rclone delete -v -P --include '.DS_Store' --include '_gsdata_/**' nextcloud: --dry-run

... it works fine for the .DS_Store files, but seems not to work for the folders with the name _gsdata_.

That am I doing wrong?

Thanks!

You can test out by running a rclone ls command.

The filters are relative from the top path so if you are looking for a those two items in the top level folder, it should work.

Some examples:

felix@gemini:~/test$ rclone ls /home/felix/test
      227 test/hosts
      227 _gsdata_/test2
      227 .DS_Store/blah
felix@gemini:~/test$ rclone ls /home/felix/test --include '.DS_Store' --include '_gsdata_/**'
      227 _gsdata_/test2
felix@gemini:~/test$ rclone ls /home/felix/test --include '.DS_Store/**' --include '_gsdata_/**'
      227 _gsdata_/test2
      227 .DS_Store/blah

and

felix@gemini:~/test$ rclone ls /home/felix/test
      227 .DS_Store/blah
      227 test/hosts
      227 1/_gsdata_/test2
felix@gemini:~/test$ rclone ls /home/felix/test --include '.DS_Store/**' --include '_gsdata_/**'
      227 .DS_Store/blah
felix@gemini:~/test$ rclone ls /home/felix/test --include '.DS_Store/**' --include '**/_gsdata_/**'
      227 .DS_Store/blah
      227 1/_gsdata_/test2

It's a bit confusing at first but once you get the hang of it, it really makes sense.

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