"Dropbox" (Service Connection)

Connect your Dropbox account to the Wolfram Language to read, modify, analyze, and create files in your Dropbox file directory.

Connecting & Authenticating

ServiceConnect["Dropbox"] creates a connection to the Dropbox API. If a previously saved connection can be found, it will be used; otherwise, a new authentication request will be launched.

Requests

ServiceExecute["Dropbox","request",params] sends a request to the Dropbox API, using parameters params. The following give possible requests.

User Data

Requests:

"UserData" data about the authenticated user's account

Search

Requests:

"FileSearch" search file names within a directory

Parameters:
  • "Query"(required)query string
    "Path""/"directory to search
  • Uploading

    "DataUpload" add or update the contents of a file

    "GraphicsUpload" add or update an image file

    Parameters:
  • "Data"(required for DataUpload)file contents
    "Graphics"
    "Path"
    "Mode"
    "Autorename"
    (required for GraphicsUpload)
    (required)
    "Add"
    True
    image or graphics directory to search file write mode ("Add", "Overwrite", "Update") rename existing file
  • Downloading

    "ImportFile" import a file

    "FileContents" get the raw contents of a file

    Parameters:
  • "Path"(required)directory to search
  • File and Directory Exploring

    "FileNames" list the files in a directory

    "FileData" file metadata

    "DirectoryData" directory metadata

    "DirectoryTreePlot" tree plot showing the layout of files in a directory

    Parameters:
  • "Path"
    "Recursive"
    "/"
    False
    directory to search recursively search directory
  • Examples

    Basic Examples  (1)

    Create a new connection by launching an authentication dialog:

    In[1]:=
    Click for copyable input
    Out[1]=
    In[2]:=
    Click for copyable input
    Out[2]=

    Store the plot as an image:

    In[3]:=
    Click for copyable input
    Out[3]=

    Verify that the file exists:

    In[4]:=
    Click for copyable input
    Out[4]=

    Check the metadata for the file:

    In[5]:=
    Click for copyable input
    Out[5]=

    Import a file:

    In[6]:=
    Click for copyable input
    Out[6]=

    Store an expression:

    In[7]:=
    Click for copyable input
    Out[7]=
    In[8]:=
    Click for copyable input
    Out[8]=

    Retrieve the file:

    In[9]:=
    Click for copyable input
    Out[9]=

    The expression is returned as it is:

    In[10]:=
    Click for copyable input
    Out[10]=

    Plot your directory structure in a tree:

    In[11]:=
    Click for copyable input
    Out[11]=