# Open all files in a folder using persistent token

**URL:** <https://forums.creativeclouddeveloper.com/t/open-all-files-in-a-folder-using-persistent-token/5326>\
**Category:** UXP Plugin API\
**Created:** [October 10, 2022, 8:22pm UTC](https://forums.creativeclouddeveloper.com/t/open-all-files-in-a-folder-using-persistent-token/5326 "2022-10-10T20:22:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [October 10, 2022, 9:48pm UTC](https://forums.creativeclouddeveloper.com/t/open-all-files-in-a-folder-using-persistent-token/5326/2 "2022-10-10T21:48:59Z")

</div>

You just need to open each file individually within your loop rather than pushing to an array and passing that to app.open().  
You’ll need to use .getEntry() and pass the returned value to app.open(). You’ll also need to use executeAsModal to perform the file open.  
See [here](http://forums.creativeclouddeveloper.com/t/can-i-open-a-photoshop-file-with-uxp/2120/15) for more detail.

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/open-all-files-in-a-folder-using-persistent-token/5326)._
