# Getting list of filenames in a folder

**URL:** <https://discourse.processing.org/t/getting-list-of-filenames-in-a-folder/17747>\
**Category:** Processing.py\
**Created:** [February 11, 2020, 7:19pm UTC](https://discourse.processing.org/t/getting-list-of-filenames-in-a-folder/17747 "2020-02-11T19:19:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [February 11, 2020, 7:24pm UTC](https://discourse.processing.org/t/getting-list-of-filenames-in-a-folder/17747/3 "2020-02-11T19:24:19Z")

</div>

Use global variable _this_ in order to access any PApplet member:  
That is, replace `dataFile('')` w/ `this.dataFile('')`

> [@How to check if a file is exist in data folder by code?](https://discourse.processing.org/t/how-to-check-if-a-file-is-exist-in-data-folder-by-code/589/6):
>
> f = this.dataFile('DoIExist.txt') filePath, exist = f.path, f.isFile() print filePath, exist

---

_[View the full topic](https://discourse.processing.org/t/getting-list-of-filenames-in-a-folder/17747)._
