# Node.js - Parent Directory hash

**URL:** <https://discuss.ipfs.tech/t/node-js-parent-directory-hash/12305>\
**Category:** Help\
**Tags:** js-ipfs, files\
**Created:** [September 29, 2021, 11:44am UTC](https://discuss.ipfs.tech/t/node-js-parent-directory-hash/12305 "2021-09-29T11:44:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JulienPlanchetCoineo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/julienplanchetcoineo/32/5496_2.png) [@JulienPlanchetCoineo](https://discuss.ipfs.tech/u/JulienPlanchetCoineo)\
**Post date:** [September 29, 2021, 11:44am UTC](https://discuss.ipfs.tech/t/node-js-parent-directory-hash/12305/1 "2021-09-29T11:44:41Z")

</div>

Hello all, thanks in advance for your time and your answers.  
I’m trying to find a way to get the parent folder’s hash of my files.  
No issues getting each file’s hash individually using many sorts of libraries (ipfs-hash-only, ipfs-http-client,…), but when I try to pass only the directory path, I get an error saying :  
`"EISDIR illegal operation on a directory".`  
How can I get the directory hash ? Without uploading to IPFS node.

Thanks

---

<div class="post-metadata">

**Author:** ![JulienPlanchetCoineo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/julienplanchetcoineo/32/5496_2.png) [@JulienPlanchetCoineo](https://discuss.ipfs.tech/u/JulienPlanchetCoineo)\
**Post date:** [October 4, 2021, 1:37pm UTC](https://discuss.ipfs.tech/t/node-js-parent-directory-hash/12305/2 "2021-10-04T13:37:53Z")

</div>

I’ve found a way if someone is interested in :  
[ipfs-only-hash/index.js at master · JulienPlanchetCoineo/ipfs-only-hash (github.com)](https://github.com/JulienPlanchetCoineo/ipfs-only-hash/blob/master/index.js)
