I have no experience in coding however I found a script online to delete folders using folder IDs from a google sheet but it's not working.
Can someone please help?
function deletefolders() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet(); //or getSheetByName() if necessary
var folderToDelete = sheet.getRange('Sheet1!A2:A4');
var folderIDs = folderToDelete.getValues();
folderIDs.forEach(function(id){
DriveApp.getFolderByID(id).setTrashed(true);
});
}
The folder IDs are in ColA