Rclone delete older files than X days in trash

By accident I ended up deleting two big folders from google with lots of subfolders.

My trash is full of very old and useless stuff, and using the web ui to restore it isn't working very well.

Is there a way to use rclone to either restore files deleted in the last 24 hours or so, or to delete everything trashed from longer than 1 day?

I'm using google drive

If you use this you should see those directories with their original structure. You can then move them back.

--drive-trashed-only

Rclone lsf --drive-trashed-only

Will help list them out as well.

Move them back how exactly?

It seems the web interface just glitched, but files are being deleted, and then restored lol.

However I made a mount like this:

rclone mount gdrive: trash --drive-use-trash=false --drive-trashed-only

So I could see what stuff I could safely delete to clean the web ui... but rclone purge doesn't seem to work, delete only delete the files, and rmdir doesn't delete folders too.

Would be nice to have a way to do such things on the trash with trashed age, or just run purge on trashed folders

I never use the trash but I thought you could just

Rclone move --drive-trashed-only drive:folder1 drive:/restored/ --dry-run

1 Like

Makes sense. Well I'll wait a few hours to see what googles decides to do with the files...

But if there is a way to delete specific folders from the trash with rclone I'd like to know

I found a way to filter only deleted folders from the web interface:

Search by just this -s is:trashed and then use the arrow down, to select only the teamdrive, or my drive.

That way you can see and delete entire trashed folders

1 Like

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