1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-05 22:53:35 +02:00
Files
OpenIntegrations/docs/en/md/Google_Drive/File-and-directory-management/Copy-object.md
Vitaly the Alpaca (bot) be77be8220 Main build (Jenkins)
2024-09-29 00:25:48 +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.a0AcM612wLdbBK14FR2SE0d3WHabYb8Xtppm0oKCcbVrecgsA-a5DfsgZ29stOw4hu84F_IpHbKTJocsm1WpjLQPBT5MJ6p8D7H1PKa_iT0...";
    Identifier = "1RijXw14hyQN_59ZOzJ9f35ezzU_qd114";
    NewName    = "CopiedFile.jpeg";
    NewParent  = "root";

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

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