Please help me to integrate a project with Google Drive. The problem is that Google Drive trash folder is never emptied, so eventually Google Drive synchronization with desktop stops working due to the lack of space.
I need either to configure the trash to not keep deleted files (preferred option) or empty it programatically from C# code (less preferred), or other programing language (last resort option) .
How do I empty Google Drive trash from code or script or whatever?
The Google Drive API doesn't expose a method to empty the trash but it has a delete
method to delete files permanently, without sending them into the trash:
https://developers.google.com/drive/v2/reference/files/delete
You can also retrieve files from trash by checking the trashed
label of the Files resource and then call delete
on them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With