So I'd like to create and (publicly) share a new folder within an existing parent.
Eg: \September 2013\[new folder here]
Sure, you could:
But then, publicly sharing that folder is not possible!
Indeed, if you try using: setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
You will get: "TypeError: Cannot find function setSharing in object Folder."
That's right, the above DriveApp function seems to only work with folders made with DriveApp.createFolder.
And of course, there is no way to simply:
... as there is no move method!
Has anyone found a solution to such a problem?
A combination of DocsList and DriveApp can be useful.
/* CODE FOR DEMONSTRATION PURPOSES */
function main() {
var parentFolder = DocsList.getFolder('September 2013');
var idNewFolder = parentFolder.createFolder('New Folder').getId();
var newFolder = DriveApp.getFolderById(idNewFolder);
newFolder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
}