Skip to main content

Create folder

Creates an empty directory on the drive

Function CreateFolder(Val Token, Val Name, Val Parent = "") Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Name--titleStringFolder name
Parent--catalogStringParent

Returns: Map Of KeyAndValue - serialized JSON response from Google


1C:Enterprise/OneScript code example
    Token     = "ya29.a0AW4XtxgOTUonqiJAYqYtxcBh8MI1VxhOH0B9hCii3RQaZlp1PVWulwBqV-y7CkKAad7Ofs4NlHXhJ3-Qe1lj4xEd-ubK_QpjEkbdCVoUW...";
Directory = "191iyaa6-2BCNRPOF0F8mQ0TuNWPNesdM";
Name = "TestFolder";

Result = OPI_GoogleDrive.CreateFolder(Token, Name, Directory);
    oint gdrive CreateFolder \
--token "***" \
--title "TestFolder"
Result
{
"kind": "drive#file",
"id": "1grSYVEN_m8PfHLj5ZrpDyMqDEtbF00E9",
"name": "TestFolder",
"mimeType": "application/vnd.google-apps.folder"
}