Copy object
Copies file or directory
Function CopyObject(Val Token, Val Identifier, Val NewName = "", Val NewParent = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Token | --token | String | ✔ | Token |
Identifier | --object | String | ✔ | Object identifier |
NewName | --title | String | ✖ | New object name |
NewParent | --catalog | String | ✖ | New parent directory |
Returns: Map Of KeyAndValue - serialized JSON response from Google
1C:Enterprise/OneScript code example
Token = "ya29.a0ARW5m7702-Ib_bOq69krqD5iUx89SC2lxGPxRJoBjqvSBqE7uKghOyAjwrL7ebNf6xqPzwD4wQfZlFvBrb7QsWlw5PGW_SvkFr57Y8Js...";
Identifier = "1Mjgg8XiYqU2gw4yjMU9d4RHfHsNENWDs";
NewName = "CopiedFile.jpeg";
NewParent = "root";
Result = OPI_GoogleDrive.CopyObject(Token, Identifier, NewName, NewParent);
- Bash
- CMD/Bat
oint gdrive CopyObject \
--token "***" \
--object "1W_FHojYzsBLfmmILZZ8yL57pF4DJ4VVz" \
--title "CopiedFile.jpeg" \
--catalog "root"
oint gdrive CopyObject ^
--token "***" ^
--object "1W_FHojYzsBLfmmILZZ8yL57pF4DJ4VVz" ^
--title "CopiedFile.jpeg" ^
--catalog "root"
Result
{
"kind": "drive#file",
"id": "19rwnmeC5Vro9P_yBfeKsPLeuSOU9Y9oC",
"name": "CopiedFile.jpeg",
"mimeType": "image/jpeg"
}