Is it possible to get a current folder name when I make a new Doc file? My script shows for me all the folders recursively from the root, but not the current one:
In a Google Drive Api I can't find info about current folder :( Please help me.
// 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());
DocumentApp.getUi().alert(folder.getName());
}