I am using the following function that lists all the folders I got in my Account.
function processGoogleDriveFolders() {
var arrayAllFolderNames,continuationToken,folders,foldersFromToken,thisFolder;
arrayAllFolderNames = [];
folders = DriveApp.getFolders();
continuationToken = folders.getContinuationToken();
Utilities.sleep(18000);
foldersFromToken = DriveApp.continueFolderIterator(continuationToken);
folders = null;
while (foldersFromToken.hasNext()) {
thisFolder = foldersFromToken.next();
arrayAllFolderNames.push(thisFolder.getName());
};
// return arrayAllFolderNames;
Logger.log(arrayAllFolderNames);
};
But trying to return all that information as a return statement to place it in the Memory will make the function to not export annything so swapping the last two lines commeting one of each
return arrayAllFolderNames;
// Logger.log(arrayAllFolderNames);
Will not return anything
But trying to return all that information as a return statement to place it in the Memory will make the function to not export annything so swapping the last two lines commeting one of eachandWill not return anything. Can I ask you about the detail of your current issue and your goal?Logger.logline right above thereturnone (and, of course, uncomment both).