Reputation: 3198
I have been trying to get the filename of a file/folder which is located in my team drive.
I have tried with
showAlert(DriveApp.getFolderById('0ANNqmMDkIgpzUk9PVA').getName());
Upvotes: 2
Views: 330
Reputation: 656
Your code is good, so
I successfully tested the following with a public folder:
SpreadsheetApp.getUi().alert(
"Folder name: " +
DriveApp.getFolderById('16EbJb18MXxnDrbc0OsMbOk4CBxrT1upM').getName()
);
The alert popped up in an open Google Sheets page.
You could also replace SpreadsheetApp.getUi().alert
with Browser.msgBox
Upvotes: 1