here code i write to achieve that including the error :
pi@raspberrypi:~ $ rclone -q --min-age 1s rmdirs google_drive:marabahan_backup/by_date/*
2018/01/29 23:21:59 ERROR : Google drive root ‘marabahan_backup/by_date/’: Failed to list “”: directory not found
2018/01/29 23:22:00 ERROR : : Failed to rmdir: directory not empty
2018/01/29 23:22:00 ERROR : Attempt 1/3 failed with 2 errors and: directory not empty
2018/01/29 23:22:00 ERROR : Google drive root 'marabahan_backup/by_date/’: Failed to list “”: directory not found
2018/01/29 23:22:01 ERROR : : Failed to rmdir: directory not empty
2018/01/29 23:22:01 ERROR : Attempt 2/3 failed with 2 errors and: directory not empty
2018/01/29 23:22:01 ERROR : Google drive root ‘marabahan_backup/by_date/*’: Failed to list “”: directory not found
2018/01/29 23:22:02 ERROR : : Failed to rmdir: directory not empty
2018/01/29 23:22:02 ERROR : Attempt 3/3 failed with 2 errors and: directory not empty
2018/01/29 23:22:02 Failed to rmdirs: directory not empty
i already check with lsd command to make sure that those subdirectory exists
i am using this too : rclone -q --min-age 1s rmdirs "google_drive:marabahan_backup/by_date/**
and this :
rclone -q --min-age 10m purge google_drive:marabahan_backup/by_date/*
2018/01/30 20:11:31 ERROR : Attempt 1/3 failed with 1 errors and: directory not found
2018/01/30 20:11:32 ERROR : Attempt 2/3 failed with 1 errors and: directory not found
2018/01/30 20:11:32 ERROR : Attempt 3/3 failed with 1 errors and: directory not found
2018/01/30 20:11:32 Failed to purge: directory not found
i got this:
if i want to delete folder using filter i should delete the content first after that i need to run other command here it is :
pi@raspberrypi:~ $ rclone -q --min-age 10m delete google_drive:marabahan_backup/by_date/
pi@raspberrypi:~ $ rclone -q --min-age 10m rmdirs --leave-root google_drive:marabahan_backup/by_date/
Note that --min-age 10m applies only to the files so what you’ve written is
delete all files older than 10m then
remove any empty directories.
Is that what you wanted?
Note that if you just want a directory and all of its contents gone then rclone purge is more efficient (on drive it will just put the directory in the trash).