0

I want to count all files in a Google Drive (sub)folder with the API in Python, but I don't know how I can do this.

In the end, I want an integer.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • How about using the files.list method of Drive API? 1. Retrieve all folders using the files.list method with the search query. 2. Retrieve the length of `files` from the returned value. This is the number of all folders. You can see the sample script at [here](https://developers.google.com/drive/api/v3/quickstart/python). But unfortunately, I couldn't understand about the detail of your current situation. If this was not the direction you want, I apologize. – Tanaike Jul 27 '19 at 23:33
  • see https://stackoverflow.com/questions/41741520/how-do-i-search-sub-folders-and-sub-sub-folders-in-google-drive – pinoyyid Jul 29 '19 at 11:25

0 Answers0