User Guide: DSim Cloud CLI download command

Modified on Wed, 18 Sep at 10:52 AM

User Guide: DSim Cloud CLI download command

Synopsis

 

mdc download [options] <remote-file-path>

 

The mdc download command allows you to download any single file remote-file-path from the remote storage to the local storage. You can prepend a path to the file to access files within directories that may not be present on the local machine. Only files can be downloaded at this time, not directories. Wildcards are not supported at this time.


Any files downloaded will have the prefix _downloaded_ prepended to the file name on the local machine to clearly indicate to you that this file has been downloaded. If there is a file of the same name (_downloaded_<filename>), in the local directory, you will be prompted to confirm to overwrite.



Options

--accept-prompts | -y Accept all prompts.



Example(s)

Below, you will find several small examples of the behaviour of the download command, based on the two directory structures listed below.



Local directory structure

root/


sub/



Remote directory structure

/remote/work/


 

top.txt

sub/

    sub.txt

only_remote/

    top.txt

 


Download behavior (assuming you start in local workspace root directory)

Command(s)
Result
mdc download top.txt 1. /remote/work/top.txt downloaded to /root/_downloaded_top.txt
2. You are prompted to override file if _downloaded_top.txt already exists in local dir
mdc download sub/sub.txt 1. /remote/work/sub/sub.txt downloaded to /root/_downloaded_sub.txt
2. You are prompted to override file if _downloaded_sub.txt already exists in local dir
mdc download only_remote/top.txt 1. /remote/work/only_remote/top.txt downloaded to /root/_downloaded_top.txt
2. You are prompted to override file if _downloaded_top.txt already exists in local dir
cd sub
mdc download ../top.txt
1. /remote/work/top.txt downloaded to /root/sub/_downloaded_top.txt
2. You are prompted to override file if _downloaded_top.txt already exists in local dir
cd sub
mdc download sub.txt
1. /remote/work/sub/sub.txt downloaded to /root/sub/_downloaded_sub.txt
2. You are prompted to override file if _downloaded_sub.txt already exists in local dir
mdc download /remote/work/sub/sub.txt 1. /remote/work/sub/sub.txt downloaded to /root/_downloaded_sub.txt
2. You are prompted to override file if _downloaded_sub.txt already exists in local dir
mdc download /some/path/outside/remote/work/outside.txt 1. An error message indicating the file is not allowed to be downloaded will be presented to you
mdc download \* 1. An error message indicating an invalid filename
mdc download not_a_file 1. An error message indicating file does not exist

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article