# Filesystem ordiring

**URL:** https://discourse.orthanc-server.org/t/filesystem-ordiring/1943
**Category:** Google Groups archive
**Created:** [May 20, 2020, 6:43am UTC](https://discourse.orthanc-server.org/t/filesystem-ordiring/1943 "2020-05-20T06:43:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![user3](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/u/ec9cab/32.png) [@user3](https://discourse.orthanc-server.org/u/user3)
#### Post date: [May 20, 2020, 6:43am UTC](https://discourse.orthanc-server.org/t/filesystem-ordiring/1943/1 "2020-05-20T06:43:13Z")

</div>

Is it possible to configure the Orthanc so that it stores images as dcm4chee does, for example, that is, in folders by year, month, and day?

---

<div class="post-metadata">

### Author: ![user19](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/u/3be4f8/32.png) [@user19](https://discourse.orthanc-server.org/u/user19)
#### Post date: [May 20, 2020, 9:08am UTC](https://discourse.orthanc-server.org/t/filesystem-ordiring/1943/2 "2020-05-20T09:08:15Z")

</div>

Приветствую). Также волновал этот вопрос, написал на почту создателю, он мне посоветовал создать тему в этой группе, чтобы они видели, в чём нуждается комьюнити.  
Хранение файлов в иерархическом типе (“Year folder - Month folder -Day folder - Patient folder”) дало бы очень много преимуществ, а так как это есть сейчас, не даёт возможности даже скрипт написать который бы удалял данные старше 5 лет или делал бы бекап. Сервер то работает отлично, лучше чем все другие варианты что я перепробовал, но вот эта лажа с тем как данные хранятся - это жесть)) Ещё интересен вопрос, как можно Orthanc заставить сделать переиндексацию базы, если это конечно возможно, а если нет то вместе с режимом хранения по иерархии нужна и функция переиндексации))

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [May 20, 2020, 9:22am UTC](https://discourse.orthanc-server.org/t/filesystem-ordiring/1943/3 "2020-05-20T09:22:20Z")

</div>

Михаил: If you expect an answer from the Orthanc core developers, please use English.

Алексей: This question was asked several times on this forum. Please make a search about “WriteToDisk.lua”.

Also, you should have a look at the following FAQ in the Orthanc Book:

[https://book.orthanc-server.com/faq/orthanc-storage.html#direct-access](https://book.orthanc-server.com/faq/orthanc-storage.html#direct-access)

---

<div class="post-metadata">

### Author: ![user3](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/u/ec9cab/32.png) [@user3](https://discourse.orthanc-server.org/u/user3)
#### Post date: [May 21, 2020, 5:16am UTC](https://discourse.orthanc-server.org/t/filesystem-ordiring/1943/4 "2020-05-21T05:16:27Z")

</div>

Sébastien, thanks for your reply!  
Do I understand correctly that now there is a solution only to store a duplicate folder with images? Is it possible to store in a convenient form exactly the storage of orthanc?

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [May 21, 2020, 7:34am UTC](https://discourse.orthanc-server.org/t/filesystem-ordiring/1943/5 "2020-05-21T07:34:57Z")

</div>

> Do I understand correctly that now there is a solution only to store a duplicate folder with images?

Yes, but you can extend the “WriteToDisk.lua” script by removing the instances from Orthanc as they are received (by doing a “RestApiDelete()” at the end of the “OnStableSeries()” of the script) if you are only interested in a way to sort files received through the DICOM protocol.

> Is it possible to store in a convenient form exactly the storage of orthanc?

Yes, it is possible, but it is not implemented yet.
