Answers: <p>Adding on @sysadmin1138's answer, to push the content of a folder to another folder while keeping the directory structure starting from the source folder, you can use:</p>
  <pre><code>(cd source-folder &amp;&amp; jfrog rt upload --detailed-summary --flat=false --recursive ./ artifact-repo/target-folder/
  </code></pre>
  <p>The <code>--detailed-summary</code> will tell you the details of all the files uploaded.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-03-23T20:38:04.973Z
Answers: 2021-03-23T20:38:04.973Z
Answers: felipecrs
Answers: <p>Since the original question is also tagged with Nexus this is how to do bulk upload with Nexus 3:</p>
  
  <pre><code>find &lt;directory name&gt;/ \! -type d -print0 | xargs -P10 -0 -I@ curl -v --user &lt;user&gt;:&lt;password&gt; --upload-file ./@ http://localhost:8081/repository/&lt;repository name&gt;/@
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2019-11-05T10:01:24.380Z
Answers: 2019-11-05T10:01:24.380Z
Answers: Markus
Answers: <p>This can be done <a href="https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory" rel="nofollow noreferrer">through the Jrog CLI</a>. The CLI has a recursive option that looks like it will do what you hope.</p>
  <pre><code>jfrog rt upload --recursive artifactory-mirror/* artifact-repo/dir-struct/
  </code></pre>
  <p>The CLI also has some performance improvements for uploads that doing it through curl or a browser don't seem to get. Also, scriptable!</p>
  <p>To include full directory structure you will want to use the flag --flat=false</p>
  <pre><code>jfrog rt upload --flat=false --recursive artifactory-mirror/* artifact-repo
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2018-07-27T06:53:12.573Z
Answers: Can we execute the JFrog CLI command on jenkins?
Answers: user_9090
Answers: CC BY-SA 4.0
Answers: 2018-07-27T13:23:49.960Z
Answers: @Gaurav Definitely, there are command-line flags for the API key and server URLs. We'll be doing it before too long.
Answers: sysadmin1138
Answers: CC BY-SA 4.0
Answers: 2020-12-10T15:18:16.490Z
Answers: "flat:false" should be "flat=false".
Answers: Étienne
Answers: CC BY-SA 4.0
Answers: 2021-03-30T18:42:15.713Z
Answers: wildcard asterisk * should either be omitted, or else the string placed in "quotes".
Answers: Sam
Answers: CC BY-SA 4.0
Answers: 2018-07-26T14:09:08.313Z
Answers: 2020-12-10T17:11:37.440Z
Answers: 2020-12-10T17:11:37.440Z
Answers: sysadmin1138
Body: <p>I am new to Artifactory, and I wonder how to upload a directory structure containing many different binaries -- keeping the structure intact -- to an artifactory? </p>
  
Comments: CC BY-SA 4.0
Comments: 2018-07-26T05:37:58.487Z
Comments: Archives like zip and tar are made exactly for this, a single artifact with multiple files within, with their rights and mode.
Comments: Tensibai
Comments: CC BY-SA 4.0
Comments: 2018-07-26T09:58:49.150Z
Comments: yes, we can use zip or tar for upload, can you please help me if we can get the same structure in the artifactory after the upload (something like unzipping the uploaded zip or tar)
Comments: user_9090
Comments: CC BY-SA 4.0
Comments: 2018-07-26T11:44:25.963Z
Comments: Well, yes, that's what they are for, `tar` was primarily a backup system (tar means tape archive), so it will unpack the same structure as was packed.
Comments: Tensibai
Comments: CC BY-SA 4.0
Comments: 2018-07-26T11:49:23.343Z
Comments: yes, but if we want it to extract on the Artifactory only, can this be possible?
Comments: user_9090
Comments: CC BY-SA 4.0
Comments: 2018-07-26T11:55:21.753Z
Comments: No, multiples files are not an artifact by definition, if all files are independent, then they are multiple artifacts by themselves
Comments: Tensibai
Tags: <maven><artifactory><nexus>
Title: Directory structure - how do I upload it as-is to an artifactory?
UserDisplayName: user_9090
ThreadText: # Directory structure - how do I upload it as-is to an artifactory?
  
  (Asked by: username_0 on 2018-07-26)
  
  I am new to Artifactory, and I wonder how to upload a directory structure containing many different binaries -- keeping the structure intact -- to an artifactory?
  
  **Tags:** maven, artifactory, nexus
  
  > **Comments:**
  > **username_1**: Archives like zip and tar are made exactly for this, a single artifact with multiple files within, with their rights and mode.  
  > **username_0**: yes, we can use zip or tar for upload, can you please help me if we can get the same structure in the artifactory after the upload (something like unzipping the uploaded zip or tar)  
  > **username_1**: Well, yes, that's what they are for, `tar` was primarily a backup system (tar means tape archive), so it will unpack the same structure as was packed.  
  > **username_0**: yes, but if we want it to extract on the Artifactory only, can this be possible?  
  > **username_1**: No, multiples files are not an artifact by definition, if all files are independent, then they are multiple artifacts by themselves  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2018-07-26. Score: 6 | Accepted answer
  
  This can be done [through the Jrog CLI](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory). The CLI has a recursive option that looks like it will do what you hope.
  
  ```
  jfrog rt upload --recursive artifactory-mirror/* artifact-repo/dir-struct/
  
  ```
  
  The CLI also has some performance improvements for uploads that doing it through curl or a browser don't seem to get. Also, scriptable!
  
  To include full directory structure you will want to use the flag --flat=false
  
  ```
  jfrog rt upload --flat=false --recursive artifactory-mirror/* artifact-repo
  
  ```
  
  > **Comments:**
  > **username_0**: Can we execute the JFrog CLI command on jenkins?  
  > **username_4**: @Gaurav Definitely, there are command-line flags for the API key and server URLs. We'll be doing it before too long.  
  > **username_5**: "flat:false" should be "flat=false".  
  > **username_6**: wildcard asterisk * should either be omitted, or else the string placed in "quotes".  
  
  ---
  
  ### Answer by username_2 on 2021-03-23. Score: 1
  
  Adding on @username_4's answer, to push the content of a folder to another folder while keeping the directory structure starting from the source folder, you can use:
  
  ```
  (cd source-folder && jfrog rt upload --detailed-summary --flat=false --recursive ./ artifact-repo/target-folder/
  
  ```
  
  The `--detailed-summary` will tell you the details of all the files uploaded.
  
  
  ---
  
  ### Answer by username_3 on 2019-11-05. Score: 1
  
  Since the original question is also tagged with Nexus this is how to do bulk upload with Nexus 3:
  
  ```
  find <directory name>/ \! -type d -print0 | xargs -P10 -0 -I@ curl -v --user <user>:<password> --upload-file ./@ http://localhost:8081/repository/<repository name>/@
  
  ```
  
  
  ---
  
  