Skip to main content

dropboxCopy

Type

command

Summary

Copy a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be copied.

Syntax

dropboxCopy <pAccessToken>, <pPathFrom>, <pPathTo>, <pAllowSharedFolder>, <pAutoRename>, [<pCallback>]

Description

If the callback parameter is not empty the request will be asynchronus and when complete the callback will be sent to the object that accessed the API. The callback will be sent with three parameters:

  • The request ID which will be the value of the it variable after calling the command
  • The HTTP response code
  • The data returned which will be the same data as documented for the it variable in a synchronous request.

Parameters

NameTypeDescription

pAccessToken

An OAuth2 Access token to access the user's account

pPathFrom

Path in the user's Dropbox to be copied.

pPathTo

Path in the user's Dropbox that is the destination.

pAllowSharedFolder

If true, copy will copy contents in shared folder, otherwise RelocationError.cant_copy_shared_folder will be returned if pFromPath contains shared folder. The default for this field is false.

pAutoRename

If there's a conflict, have the Dropbox server try to autorename the file to avoid the conflict. The default for this field is false.

pCallback

The handler to call when the request is complete. If empty the command will block until complete.