# How to create a directory in Orthanc where you can specifically route your files into using the dcmtk C-STORE request.

**URL:** https://discourse.orthanc-server.org/t/how-to-create-a-directory-in-orthanc-where-you-can-specifically-route-your-files-into-using-the-dcmtk-c-store-request/2777
**Category:** Google Groups archive
**Created:** [January 22, 2022, 2:32pm UTC](https://discourse.orthanc-server.org/t/how-to-create-a-directory-in-orthanc-where-you-can-specifically-route-your-files-into-using-the-dcmtk-c-store-request/2777 "2022-01-22T14:32:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Wisdom\_James\_Murombo](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/w/a9adbd/32.png) [@Wisdom\_James\_Murombo](https://discourse.orthanc-server.org/u/Wisdom_James_Murombo)
#### Post date: [January 22, 2022, 2:32pm UTC](https://discourse.orthanc-server.org/t/how-to-create-a-directory-in-orthanc-where-you-can-specifically-route-your-files-into-using-the-dcmtk-c-store-request/2777/1 "2022-01-22T14:32:32Z")

</div>

Is there a plugin or way in Orthanc where you can create directories to specifically route files into using the dcmtk C-Store request.

Also, it seems that the c-store request is not sending all dicom files into my desired directory. Some are being left behind. What could be the problem?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Alain\_Mazy1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Alain\_Mazy1](https://discourse.orthanc-server.org/u/Alain_Mazy1)
#### Post date: [January 24, 2022, 7:30am UTC](https://discourse.orthanc-server.org/t/how-to-create-a-directory-in-orthanc-where-you-can-specifically-route-your-files-into-using-the-dcmtk-c-store-request/2777/2 "2022-01-24T07:30:14Z")

</div>

Hi,

Sorry but I’m not sure I understand your message.

Are you talking about incoming or outgoing C-Store ?  
Your second sentence seems to indicate that you achieved part of what you requested in the first sentence !?

Best regards,

Alain

---

<div class="post-metadata">

### Author: ![Alain\_Mazy](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/9de053/32.png) [@Alain\_Mazy](https://discourse.orthanc-server.org/u/Alain_Mazy)
#### Post date: [January 28, 2022, 8:14am UTC](https://discourse.orthanc-server.org/t/how-to-create-a-directory-in-orthanc-where-you-can-specifically-route-your-files-into-using-the-dcmtk-c-store-request/2777/3 "2022-01-28T08:14:25Z")

</div>

Hi,

I’m very sorry but, I’m totally lost with your message.

If you want to save files to directories when you receive them from an external incoming C-Store, you may use this lua script: [https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/Samples/Lua/WriteToDisk.lua](https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/Samples/Lua/WriteToDisk.lua).

If you want to send DICOM files from a specific folder to another modality (using an outgoing C-Store to another modality) then, you probably just need storescu from DCMTK and not Orthanc.

HTH,

Alain.
