jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

Download file to current directory

Open coveritytest opened this issue 3 years ago • 4 comments

When I do

jfrog rt dl a/b/c.zip

I would expect c.zip to be in the current directory, but it is written to a/b/c.zip, for whatever reason. How can I force the CLI to download it to the current directory?

coveritytest avatar Mar 24 '22 13:03 coveritytest

@coveritytest, To download c.zip to the current directory, add the --flat flag:

jfrog rt dl a/b/c.zip --flat

--flat [Default: false] Set to true if you do not wish to have the Artifactory repository path structure created locally for your downloaded files.

For more information read the docs: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-DownloadingFiles

Please let me know if that helped.

yahavi avatar Mar 24 '22 14:03 yahavi

Thanks!

coveritytest avatar Mar 24 '22 14:03 coveritytest

@yahavi Same question, but this time I want to download the contents of a directory named c, which contains files and other subdirectories.

jf rt dl a/b/c

If I use --flat, that flattens everything under directory c as well, which I don't want. How do you accomplish this?

rfrancioso-gpsw avatar Apr 12 '24 01:04 rfrancioso-gpsw

@rfrancioso-gpsw You might find Using Placeholders helpful here. For example: jf rt dl a/b/c/(*) ./{1}

RobiNino avatar Apr 14 '24 10:04 RobiNino