I am trying to get a list of files in a folder on Google drive using the Google drive API. When I make my request I am getting a list of child elements in that folder including previous deleted files.
How do I get only the files that are in the folder without the ones that have been deleted or trashed?
I don't think you are seeing deleted files. Deleted files are permanently deleted. I think you are seeing trashed files which are like putting files in the trash can on windows, they are removed but not really gone.
You want to add a search parameter to your files.list request. you want to tell it to not include trashed.
trashed = false
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