Reputation: 3
According to the Google Apps Script API reference here the getFolders() function invoked on a Folder should return a FolderIterator which can then be "manipulated" using .hasNext() and .next().
However in one of my Google scripts contained within a Google Spreadsheet it returns an array of folders! And not only that but it only returns the first 250 sub-folders in the folder (out of about 260). When I first created this script getFolders() used to indeed return an array and that's what the spec said too (looks like this has since changed...). And the script worked just fine until the number of sub-folders in one folder exceeded 250.
Has anyone experienced this before? Any suggestions as to what may be going on and how to resolve it? Could my script, authored months ago, be using a superseeded version of the Google Apps Spreadsheet "library" which returned an array of folders. Instead of using the new library which returns a FolderIterator? If so how can I force it to start using the new libray?
Many thanks in advance for any help!
Petros
Upvotes: 0
Views: 741
Reputation: 19835
If you were to post the actual code we could see that you are probably using docsList and not DriveApp
Upvotes: 1