获取所有文件夹 - 将文件夹放入延续令牌 - 然后从令牌中检索

 function processGoogleDriveFolders() {
  var arrayAllFolderNames,continuationToken,folders,foldersFromToken,thisFolder;//Declare variable names
  
  arrayAllFolderNames = [];//Create an empty array and assign it to this variable name
  
  folders = DriveApp.getFolders();//Get all folders from Google Drive in this account
  continuationToken = folders.getContinuationToken();//Get the continuation token

  Utilities.sleep(18000);//Pause the code for 3 seconds
  
  foldersFromToken = DriveApp.continueFolderIterator(continuationToken);//Get the original folders stored in the token
  folders = null;//Delete the folders that were stored in the original variable, to prove that the continuation token is working
  
  while (foldersFromToken.hasNext()) {//If there is a next folder, then continue looping
    thisFolder = foldersFromToken.next();//Get the next folder
    arrayAllFolderNames.push(thisFolder.getName());//Get the name of the next folder
  };
  
  Logger.log(arrayAllFolderNames);//print the folder names to the Logs
};