1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/Google_Drive/File-and-directory-management/Copy-object.md
Vitaly the Alpaca (bot) 2e85cb9d03 Main build (Jenkins)
2024-09-29 21:40:58 +03:00

1.2 KiB

sidebar_position
sidebar_position
7

Copy object

Copies file or directory

Function CopyObject(Val Token, Val Identifier, Val NewName = "", Val NewParent = "") Export

Parameter CLI option Type 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


    Token      = "ya29.a0AcM612xw6IRwwkQIOEhizd2pJ6LLI4UAhdhxmXDGEzYkcfUPrLYgDDwbsSi5iQdc78WPs_1_Qor5KipuV6mAIvr6z-AKzrBaMT4erIR5T...";
    Identifier = "1f-YrvMCEZ7r3JWlLGM39zn6dctvFjwCi";
    NewName    = "CopiedFile.jpeg";
    NewParent  = "root";

    Result = OPI_GoogleDrive.CopyObject(Token, Identifier, NewName, NewParent);
    
  oint gdrive CopyObject --token %token% --object "1F8pfXPgltiOG2fPv88uStwegYj1tRoFk" --title %title% --catalog %catalog%

{
 "kind": "drive#file",
 "id": "1QLPdhfJMz9P3UJBMCvF4zYzi6yqDlYaU",
 "name": "CopiedFile.jpeg",
 "mimeType": "image/jpeg"
}