This is my current code:
function myFunction() {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Remove_Later", "Name", "Client", "Name of project", "Deliverables"]); //writes the headers
var topFolder = DriveApp.getFolderById("ThisIsTheFolderId");
var topPath = "/";
iterateSubFolders(topFolder, topPath);
}
function iterateSubFolders(callingFolder, callingPath) {
var callingFolderName = callingFolder.getName();
var callingFolderFullPath = callingPath + callingFolderName + "/";
Logger.log(callingFolderFullPath);
var childSubFolders = callingFolder.getFolders();
while (childSubFolders.hasNext()) {
var nextSubFolder = childSubFolders.next();
iterateSubFolders(nextSubFolder, callingFolderFullPath);
}
}
I have not been able to get the console output in a google sheet which i would like. I have no clue and have been struggling for hours now. Help is highly appreciated! Thank you in advance :)