# How to create a new directory in a nexus repository?

**URL:** <https://community.sonatype.com/t/how-to-create-a-new-directory-in-a-nexus-repository/6528>\
**Category:** Sonatype Nexus Repository\
**Created:** [May 14, 2021, 2:10pm UTC](https://community.sonatype.com/t/how-to-create-a-new-directory-in-a-nexus-repository/6528 "2021-05-14T14:10:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krasimir.marinov.itgix](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@krasimir.marinov.itgix](https://community.sonatype.com/u/krasimir.marinov.itgix)\
**Post date:** [May 14, 2021, 2:10pm UTC](https://community.sonatype.com/t/how-to-create-a-new-directory-in-a-nexus-repository/6528/1 "2021-05-14T14:10:56Z")

</div>

Hello,  
I have to upload some files to nexus repository manager and I can do it using curl, however they have to be in a directory, which at the moment is not created? So, my question is, can I use curl to create the directory and upload files to it and if not, how can I do this? The version, which I am using is 3.29.2-02

---

<div class="post-metadata">

**Author:** ![mmartz](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mmartz](https://community.sonatype.com/u/mmartz)\
**Post date:** [May 14, 2021, 5:53pm UTC](https://community.sonatype.com/t/how-to-create-a-new-directory-in-a-nexus-repository/6528/2 "2021-05-14T17:53:07Z")

</div>

I assume you are talking about uploading to a raw repository? If so any necessary directory structure will be created automatically. (Internally the directory doesn’t exist, the browse tree is generated from the group assigned to the asset which in the case of a raw repository means the folder structure.)

EDIT: Generally the same applies to other formats, Nexus Repository Manager doesn’t store directories, just files and metadata.

---

<div class="post-metadata">

**Author:** ![krasimir.marinov.itgix](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@krasimir.marinov.itgix](https://community.sonatype.com/u/krasimir.marinov.itgix)\
**Post date:** [May 18, 2021, 2:09pm UTC](https://community.sonatype.com/t/how-to-create-a-new-directory-in-a-nexus-repository/6528/3 "2021-05-18T14:09:33Z")

</div>

Well yes. But the case is that I was doing an update from version 2.14.20-02 to version 3.29.2-02 and after the sync there were some missing directories. I found out how I can send the files from those directories via curl, but I was to be able to create the directory first, of send the whole directory

---

<div class="post-metadata">

**Author:** ![mprescott](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/mprescott/32/178_2.png) [@mprescott](https://community.sonatype.com/u/mprescott)\
**Post date:** [May 20, 2021, 1:27pm UTC](https://community.sonatype.com/t/how-to-create-a-new-directory-in-a-nexus-repository/6528/4 "2021-05-20T13:27:23Z")

</div>

Nexus 2 and 3 are different in this regard. Nexus Repository 2 stores its content on the file system, so there is such a thing as an empty directory. Nexus Repository 3 doesn’t do that, it stores content as blobs in a binary blob store. They are associated with a path, but it’s really just a string - no ‘directory’ needs to exist to hold the files. There’s no way to ask Nexus 3 to ‘create a directory’.
