1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
function CreateParentFolderChildFolderlSample() { const parentFolderName = "parent" const ChildFolderName = "Child" //親フォルダ let parentFolder = DriveApp.createFolder(parentFolderName) console.log(parentFolder.getName()); console.log(parentFolder.getId()); //あえて、親フォルダのIDからフォルダを取得 let parentFolder2 = DriveApp.getFolderById(parentFolder.getId()); console.log(parentFolder2.getName()); console.log(parentFolder.getId()); //親フォルダの中に子フォルダを作成 let ChildFolder = parentFolder2.createFolder(ChildFolderName); console.log(ChildFolder.getName()); console.log(ChildFolder.getId()); } |
コメント