# How to access path module?

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-access-path-module/5974>\
**Category:** UXP Plugin API\
**Tags:** javascript\
**Created:** [March 4, 2023, 10:38pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-access-path-module/5974 "2023-03-04T22:38:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sttk3](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sttk3](https://forums.creativeclouddeveloper.com/u/sttk3)\
**Post date:** [March 5, 2023, 12:49am UTC](https://forums.creativeclouddeveloper.com/t/how-to-access-path-module/5974/2 "2023-03-05T00:49:45Z")

</div>

According to @shuji, path variable can be used without any declaration.

- [Photoshop UXP localFileSystem | city-pop-mix.com](https://city-pop-mix.com/blog/UXP/localFileSystem)
- [UXP\_path.js | GitHub Gist](https://gist.github.com/tokyosheep/95fe5fc2edfd1b15b07604f9bff886de)

```auto
const pathText = `file:/Users/username/Desktop/filename.txt` ;

const parentFolder = path.dirname(pathText) ;
console.log(parentFolder) ; // --> file:/Users/username/Desktop

const nameWithoutExtension = path.parse(pathText).name ;
console.log(nameWithoutExtension) ; // --> filename

```

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/how-to-access-path-module/5974)._
