!! Please, change or add new type how Orthanc store data in the storage folder !!

Hi Orthanc team!
Im glad to use your software. This is a the best solution from free open source PACS/DICOM servers that I tested (more than 5).
I love in Orthanc almost all, except type like an Orthanc store DICOM files in its storage folder. Because of this, I can’t delete, find folder with patient files, or most important for me - create a .bat file, that can backup or delete Dicom files older than few years. Change the type like Orthanc store Dicom data on hierarchical type (in example “Year folder - Month folder - Day folder - Patient folder”) help ALL OF US in many ways with using Orthanc server.

Also, how to re-index data in storage folder, is it possible now? If not, please add this functionality with hierarchical store type too.
This two functions help us (all users of Orthanc!) to resolve many problems with everyday usage of Orthanc Server!

All, who also interested in this solution - PLEASE, leave your messages under this topic!


Thanks for the positive feedback.

1- Your question regarding the storage area was already answered in the following post:

Summarizing, we won’t change the way Orthanc stores its database. This is because Orthanc addresses much more complex workflow than a desktop server that stores DICOM files on its filesystem (think for example about the fact that Orthanc can store its DICOM files into a PostgreSQL database or a AWS S3 bucket).

The “WriteToDisk.lua” script provides a way of emulating your wish.

It is also possible to create a so-called “storage area” plugin through which Orthanc could store the DICOM files similarly to what you describe (but this obviously requires a development effort):

2- Regarding your question about re-indexing a storage folder, check out the Orthanc Book (“Direct access to the filesystem” section):


Sébastien, many thanks for your answer!
About “WriteToDisk.lua” script. I found and downloaded script from your post on GitHub. Can you say how install it in Windows and get the result that i needed in the storage folder?
I already put downloaded script into storage folder “E:\Orthanc-StorageDir” and type path in orthanc.json:

// List of paths to the custom Lua scripts that are to be loaded
// into this instance of Orthanc
“LuaScripts” : [


What next?

There’s nothing else you need to do beside restarting Orthanc such that it takes into account the new configuration.