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.a0AcM612wmWdggP-K6tOc3UqW0KxYMjUi60_Uhu-ERltTaavHGbML0nRBXqkuiBcr0GNmR_1gHKowaF1Rd_4Q5Amc9O23DEBZ95sNEGnpR5...";
Identifier = "1Uw6seoqvBcqUeIFLkklWn8ZNBc6nQkpY";
NewName = "CopiedFile.jpeg";
NewParent = "root";
Result = OPI_GoogleDrive.CopyObject(Token, Identifier, NewName, NewParent);
- Bash
- CMD/Bat
oint gdrive CopyObject \
--token "***" \
--object "1MgRgtXCENs_8VuQjX6WFY7s6Yv9RoaJV" \
--title "CopiedFile.jpeg" \
--catalog "root"
oint gdrive CopyObject ^
--token "***" ^
--object "1MgRgtXCENs_8VuQjX6WFY7s6Yv9RoaJV" ^
--title "CopiedFile.jpeg" ^
--catalog "root"
Result
{
"kind": "drive#file",
"id": "19rwnmeC5Vro9P_yBfeKsPLeuSOU9Y9oC",
"name": "CopiedFile.jpeg",
"mimeType": "image/jpeg"
}