Rm -rf /some/path*, how to?


Is there a way for rclone to do something like rm -rf /some/path* example: rclone rm -rf crypted:/some/path/2018* which would remove all folders (and subfolders/files) in /some/path that starts with 2018?

Thanks :slight_smile:

You could do this with a small amount of scripting…

I’d do somehing like this to make a list of candidate directories

rclone lsf -R --dirs-only crypted:/some/path | egrep '(^|/)2018' > dirs

Examine that list by hand then so something like this

for i in `cat dir`; do echo rclone purge  crypted:/some/path/"$i"; done

remove echo when happy!