# Loading folders and data

**URL:** <https://discourse.slicer.org/t/loading-folders-and-data/30239>\
**Category:** Development\
**Tags:** python\
**Created:** [June 26, 2023, 4:51pm UTC](https://discourse.slicer.org/t/loading-folders-and-data/30239 "2023-06-26T16:51:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Li](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/patrick_li/32/66178_2.png) [@Patrick\_Li](https://discourse.slicer.org/u/Patrick_Li)\
**Post date:** [June 26, 2023, 4:51pm UTC](https://discourse.slicer.org/t/loading-folders-and-data/30239/1 "2023-06-26T16:51:44Z")

</div>

I’m looking for a way to load a directory. For example, I want to be able to load the selected folder in the screenshot from a specific directory on my device. While I’ve found loadVolume() and loadSegmentation() functions, I haven’t found one for directories.

 ![Screenshot 2023-06-26 125053](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/d/6de8d29d1bb8063a1036c5461ac642b98ac9e4ff.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:** [June 28, 2023, 3:08am UTC](https://discourse.slicer.org/t/loading-folders-and-data/30239/2 "2023-06-28T03:08:30Z")

</div>

You can get the list of files in a folder using standard Python functions and then call `slicer.util.loadNodeFromFile(filepath)` for each file.
