Stay organized with collectionsSave and categorize content based on your preferences.
FolderIterator
An object that allows scripts to iterate over a potentially large collection of folders. Folder
iterators can be accessed fromDriveApp, aFile, or aFolder.
Gets the next item in the collection of files or folders.
Detailed documentation
getContinuationToken()
Gets a token that can be used to resume this iteration at a later time. This method is useful
if processing an iterator in one execution would exceed the maximum execution time.
Continuation tokens are generally valid for one week.
Return
String— a continuation token that can be used to resume this iteration with the items that
remained in the iterator when the token was generated
hasNext()
Determines whether callingnext()will return an item.
Return
Boolean—trueifnext()will return an item;falseif not
next()
Gets the next item in the collection of files or folders. Throws an exception if no items
remain.