Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to find out the total number of documents exposed via Google Docs.

share|improve this question
What do you mean by exposed? Do you mean shared with you? Created by you? Opened by you? – OnenOnlyWalter Mar 21 '13 at 17:34
up vote 1 down vote accepted

Goto script.google.com and start a new script and copy in the following code:

function doGet() {  

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.

See screenshot:
enter image description here

share|improve this answer
I tried running this script, but it doesn't show me any output. function doGet() { Logger.log(DocsList.getAllFiles().length); } – Rpj Mar 22 '13 at 10:59
@Rpj Did you press the two buttons? – Jacob Jan Tuinstra Mar 22 '13 at 11:11
@Rpj Make sure to press Ctrl + Enter afterwards to show the logger info !! – Jacob Jan Tuinstra Mar 22 '13 at 11:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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