Google-drive – How to count all the files inside Google Drive root

google-drive

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.

Best Answer

Short Answer

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

Alternatives

Google Apps Script.

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

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