I'm looking to retrieve the entire folder/subfolder directory from MyDrive and print out to a file type (not sure what' possible). I ran the following code and received a "max execution timeout" error.
// Log the name of every folder in the user's Drive.
var folders = DriveApp.getFolders();
while (folders.hasNext()) {
var folder = folders.next();
Logger.log(folder.getName());
}
MyDrive contains over 20,000 files, not sure on the folder/sub-folder count. I'm assuming the above code is meant as a starting point and not the actual full script.
Any help would be appreciated to help me get around this issue. I only need to run the script once.
Thanks, Ryan.