How to find out the total number of documents exposed via Google Docs?
1 Answer
Goto script.google.com and start a new script and copy in the following code:
function doGet() {
Logger.log(DocsList.getAllFiles().length);
}
De-bug the code by pressing the "bug" button. An authorization menu will popup, that will ask permission to access Docs.
When having granted the script access to Docs, then play the script by pressing the "play" button. This might take a while, since it must read all files.
Press Ctrl + enter to view the logger (menu views/logs). Here the amount of files is displayed.
EDIT
See screenshot:
-
I tried running this script, but it doesn't show me any output. function doGet() { Logger.log(DocsList.getAllFiles().length); }– RpjCommented Mar 22, 2013 at 10:59
-
-
@Rpj Make sure to press Ctrl + Enter afterwards to show the logger info !! Commented Mar 22, 2013 at 11:18