Command Line Client/Upload and Download Files

You can use dx upload and dx download to upload local files into the platform and download files from the platform, respectively. Note that for large numbers of files and other features such as resumable uploads from outside of the platform, it is highly recommended that you use the Upload Agent instead for file uploads. If you are trying to upload a file that is not local but is hosted at a publicly accessible URL, you can use the URL Fetcher app and launch however many of these you would like in parallel.


If you choose to use dx upload to upload your file, the same metadata arguments are used as for creating records from scratch. However, this command also takes the additional action of calling "close" on the file once the upload is finished. You can provide the ‑‑wait option to wait until the file has finished closing.

$ dx upload foo.txt --wait --property testing=1 --property testing2=2 ID file-B0p1gVK4Zg28BGyKZvP00003 Class file Project project-9zVpbQf4Zg2641v5BGY00001 Folder /bar Name foo.txt State closed Visibility visible Types - Properties testing=1, testing2=2 Tags - Details {} Outgoing links - Created Tue Aug 21 16:37:41 2012 Created by alice Last modified Tue Aug 21 16:37:43 2012 Media type text/plain Size 751 bytes

Note that if you provide "-" as the local filename, stdin will be used instead.


You can download any file object on the platform using dx download. By default, it will try to use the same name as the file on the platform, but you can also override it using ‑o/‑‑output. If you provide "-" as the output filename, the file will be printed to stdout instead (dx cat is an alias for this functionality).

$ dx download bar/foo.txt
$ ls

Last edited by Phil Sung, 2013-01-28 02:11:54