如何从函数参数创建文件夹 示例
function uploadFileToGoogleDrive(data, file,namaf) {
try {
namafolder=namaf;
createFolder([namafolder];
}
}
不是从像
这样的变量创建的var name ="Myfoldernanme";
var newfolder = folder.createFolder(name);
答案 0 :(得分:0)
DocsList和DriveApp的组合非常有用。
/* CODE FOR DEMONSTRATION PURPOSES */
function main() {
var parentFolder = DocsList.getFolder('September 2017');
var idNewFolder = parentFolder.createFolder('New Folder').getId();
var newFolder = DriveApp.getFolderById(idNewFolder);
newFolder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
}