I know how to find the count of all files inside a folder in Google Drive. But I need to know the count of items that exist in the root of my Google Drive. How can I do that? I can't find an option, and I can't find the answer through search.

  • There is no option for this.
    – serenesat
    Commented Jul 17, 2015 at 11:47
  • @serenesat, can I get to that result using Google Scripts? Commented Jul 17, 2015 at 11:53
  • I didn't see any method to count the number of files but you can get the list of folders by getFolders() method.
    – serenesat
    Commented Jul 17, 2015 at 12:05

1 Answer 1


Short Answer

Google Drive UI doesn't include a way to count files in My Unit but not in other folders.


Google Apps Script.

From https://developers.google.com/apps-script/reference/drive/drive-app#getFiles()


Gets a collection of all files in the user's Drive.

Google Drive for PC/Mac

Use the Windows / Finder features to count the files for you.

Protip: Deselect all the folders so only files directly in My Unit will be synced. For further details, see Choose what syncs to your computer - Drive Help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.