DownloadFile
Downloads the contents of a file from Dropbox to the local system; requires content read access.
Execute
Refer to the query examples below for using the procedure:
query = "EXEC DownloadFile Id = 'id:LAvTtXjyNEYAAAAAAAAADg', DownloadTo = 'C:/Users/User/Downloads'"; query = "EXEC DownloadFile Revision = 'rev:60fc8c685aace89083943', DownloadTo = 'C:/Users/User/Downloads'"; query = "EXEC DownloadFile Path = '/Test Folder/Test File.txt', DownloadTo = 'C:/Users/User/Downloads'";
Input
| Name | Type | Required | Accepts Output Streams | Description |
| Id | String | False | False | The unique identifier of the file to download. |
| Revision | String | False | False | The specific revision of the file to download, such as 'rev:a1c10ce0dd78'. |
| Path | String | False | False | The full Dropbox path of the file or folder to download. |
| AsZip | Boolean | False | False | When set to true, downloads the folder as a ZIP archive. Must be set to true when downloading a folder. |
| DownloadTo | String | False | False | The local directory path where the file should be saved. Ignored if the FileStream parameter is used. |
| FileStream | String | False | True | An output stream instance used to write file data directly. Used only when the DownloadTo parameter is not set. |
Result Set Columns
| Name | Type | Description |
| Success | String | Returns a value of True when the file or folder is successfully downloaded; otherwise, returns False. |
| Id | String | The unique identifier of the downloaded file. |
| Name | String | The name of the file, including its extension. |
| Revision | String | The identifier for the file's current revision. |
| DisplayPath | String | The display-formatted path of the file, with preserved casing for readability. |
| LowerCasePath | String | The full Dropbox path of the file in lowercase, used for consistency and comparison. |
| ClientModified | String | The timestamp when the file was last modified by the client before being uploaded to Dropbox. |
| ServerModified | String | The timestamp of the last modification made to the file on Dropbox servers. |
| Size | String | The size of the file in bytes. |
| ContentHash | String | A hash value representing the file content, used for integrity checks. |
| PreviewURL | String | A URL that can be used to preview the file in the browser. |
| IsDownloadable | String | When set to true, the file can be downloaded directly. If False, the file must be exported instead. |
| HasExplicitSharedMembers | String | When set to true, indicates that the file has explicitly assigned shared members. |
| FileData | String | The Base64-encoded file content, returned when neither DownloadTo nor FileStream is specified. |