# Get path node (file path directory)

**URL:** <https://discourse.slicer.org/t/get-path-node-file-path-directory/27325>\
**Category:** Support\
**Created:** [January 18, 2023, 12:32pm UTC](https://discourse.slicer.org/t/get-path-node-file-path-directory/27325 "2023-01-18T12:32:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucas\_sd](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lucas_sd/32/17087_2.png) [@lucas\_sd](https://discourse.slicer.org/u/lucas_sd)\
**Post date:** [January 18, 2023, 12:32pm UTC](https://discourse.slicer.org/t/get-path-node-file-path-directory/27325/1 "2023-01-18T12:32:38Z")

</div>

Hi everybody,

Im working in a module, and I need to save the path directory of a node.

I would like to know if there is a command to get this (like getdirofnode, obtain something like ‘/User/data/etc/’, and save it like a variable).

Thanks, Lucas.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [January 18, 2023, 1:52pm UTC](https://discourse.slicer.org/t/get-path-node-file-path-directory/27325/2 "2023-01-18T13:52:06Z")

</div>

Review information regarding the “Storage Node”.  
[https://slicer.readthedocs.io/en/latest/developer\_guide/mrml\_overview.html#the-storage-node](https://slicer.readthedocs.io/en/latest/developer_guide/mrml_overview.html#the-storage-node)

Then check out the script repository for various example usages of the storage node. You should be able to put together various examples that fit your specific use case.  
[https://slicer.readthedocs.io/en/latest/developer\_guide/script\_repository.html](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html)

---

<div class="post-metadata">

**Author:** ![lucas\_sd](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lucas_sd/32/17087_2.png) [@lucas\_sd](https://discourse.slicer.org/u/lucas_sd)\
**Post date:** [January 18, 2023, 2:54pm UTC](https://discourse.slicer.org/t/get-path-node-file-path-directory/27325/3 "2023-01-18T14:54:36Z")

</div>

Hi James, thanks for the info,

Finally I coud do it using the functions GetStorageNode() and GetFullNameFromFileName().

Thanks, Lucas.
