# Import Folder Structure in Windows Explorer to Subject Hierarchy

**URL:** <https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796>\
**Category:** Support\
**Created:** [July 30, 2020, 7:27pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796 "2020-07-30T19:27:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Morrison](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ryan_morrison/32/7508_2.png) [@Ryan\_Morrison](https://discourse.slicer.org/u/Ryan_Morrison)\
**Post date:** [July 30, 2020, 7:27pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796/1 "2020-07-30T19:27:01Z")

</div>

Is there a way to import a bunch of models into the subject hierarchy while maintaining their folder structure? It would be nice to not have to manually create the folder structure in slicer.

Windows explorer:

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/e/6edcb4d39ad69038a50d5d50a7eeebb8580a3a05.png)

Slicer Hierarchy:

 ![Capture2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/6/2626b60e3e01d3a1aa092b7a32e350775bacf6b1.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 30, 2020, 7:32pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796/2 "2020-07-30T19:32:06Z")

</div>

To create subject hierarchy folders corresponding to location of files in the file system, right-click on an empty (white) area in the Subject hierarchy tree view and then choose “Create hierarchy from loaded directory structure”:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/2/32efd65113c296a40c5e922ed48507c9476cf34b.png)

---

<div class="post-metadata">

**Author:** ![Ryan\_Morrison](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ryan_morrison/32/7508_2.png) [@Ryan\_Morrison](https://discourse.slicer.org/u/Ryan_Morrison)\
**Post date:** [July 30, 2020, 7:48pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796/3 "2020-07-30T19:48:21Z")

</div>

You’ve come to the rescue once again Andras! I really cannot thank you enough.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 30, 2020, 8:02pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796/4 "2020-07-30T20:02:17Z")

</div>

I didn’t know if anybody ever used this after I implemented it years ago. Good to know someone does 🙂 It seems we keep it!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 30, 2020, 8:11pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796/5 "2020-07-30T20:11:03Z")

</div>

I’ve just pointed it out. It was @cpinter who implemented it.

We should make it easier to discover.

---

<div class="post-metadata">

**Author:** ![Ryan\_Morrison](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ryan_morrison/32/7508_2.png) [@Ryan\_Morrison](https://discourse.slicer.org/u/Ryan_Morrison)\
**Post date:** [July 30, 2020, 8:15pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796/6 "2020-07-30T20:15:10Z")

</div>

Thanks @cpinter! It’s hugely helpful. It would be nice if it was done automatically when one drags/drops a folder with many subfolders into slicer. The feature is a bit hidden.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 30, 2020, 8:23pm UTC](https://discourse.slicer.org/t/import-folder-structure-in-windows-explorer-to-subject-hierarchy/12796/7 "2020-07-30T20:23:24Z")

</div>

I agree. I thought about this back then but don’t have a good solution for making it more accessibe.
