createFolder
function createFolder(
path: string,
rootFolder?: GoogleAppsScript.Drive.Folder
): GoogleAppsScript.Drive.Folder;
The path is walked segment by segment: an existing folder of that name is entered, a missing one is created. Drive allows two folders to share a name, so the first match wins rather than a second one being made.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The folder path, separated by |
|
| Where to start. The Drive root by default. |
Returns
GoogleAppsScript.Drive.Folder — the folder at the end of the path.
Examples
In use
const folder = createFolder("reports/2026/january");
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.