# Files in data folder not found by IDE

**URL:** <https://discourse.processing.org/t/files-in-data-folder-not-found-by-ide/36736>\
**Category:** Beginners\
**Created:** [May 5, 2022, 3:27pm UTC](https://discourse.processing.org/t/files-in-data-folder-not-found-by-ide/36736 "2022-05-05T15:27:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mv511](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mv511](https://discourse.processing.org/u/mv511)\
**Post date:** [May 5, 2022, 3:27pm UTC](https://discourse.processing.org/t/files-in-data-folder-not-found-by-ide/36736/1 "2022-05-05T15:27:55Z")

</div>

Guys,  
I currently have three files in my data folder inside the sketch’s own folder.  
One file, test.db, a file I use with BezierSQL, shows “true” when I run System.out.println(new java.io.File(“test.db”).exists());  
With the same script, in the same sketch, I try to do the same with a “.png” file and a “.txt” file, and both come out as false.  
I started doing this because a JLabel object with setIcon was not working.

I checked the extensions under Windows 11 (I have the “show file extensions” option checked), I renamed files, changed them, restarted the Processing IDE and rebooted the PC, created a new sketch and so on.  
Only the .db file is found. Can someone tell me where am I wrong?

---

<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:** [May 5, 2022, 3:41pm UTC](https://discourse.processing.org/t/files-in-data-folder-not-found-by-ide/36736/2 "2022-05-05T15:41:32Z")

</div>

Use [**sketchFile()**](http://processing.github.io/processing-javadocs/core/processing/core/PApplet.html#sketchFile-java.lang.String-) or [**dataFile()**](http://processing.github.io/processing-javadocs/core/processing/core/PApplet.html#dataFile-java.lang.String-) to obtain a File object pointing to sketch’s folder.  
Use [**sketchPath()**](http://processing.github.io/processing-javadocs/core/processing/core/PApplet.html#sketchPath--) or **[dataPath()](http://processing.github.io/processing-javadocs/core/processing/core/PApplet.html#dataPath-java.lang.String-)** to obtain sketch’s folder path as a String.

---

<div class="post-metadata">

**Author:** ![mv511](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mv511](https://discourse.processing.org/u/mv511)\
**Post date:** [May 5, 2022, 3:42pm UTC](https://discourse.processing.org/t/files-in-data-folder-not-found-by-ide/36736/3 "2022-05-05T15:42:36Z")

</div>

I used dataPath() to find out the path I needed and it was the right one.  
I’ll try to see if with dataFile() I’ll be able to retrieve either the .png or the .txt file

---

<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:** [May 5, 2022, 3:44pm UTC](https://discourse.processing.org/t/files-in-data-folder-not-found-by-ide/36736/4 "2022-05-05T15:44:05Z")

</div>

> [@mv511](#):
>
> … I’ll be able to retrieve either the .png or the .txt file.

> [@How do I slowly layer photos to appear on top of eachother?](https://discourse.processing.org/t/how-do-i-slowly-layer-photos-to-appear-on-top-of-eachother/36698/5):
>
> This example loads all images inside subfolder “data/” and assign them to a PImage[] array: framed_picture /\*\* \* Load All Images (v1.0.0) \* GoToLoop (2022/May/04) \* \* https://Discourse.Processing.org/t/ \* how-do-i-slowly-layer-photos-to-appear-on-top-of-eachother/36698/5 \*/ static final String PICS\_EXTS = "extensions=,png,jpg,jpeg,gif,tif,tiff,tga,bmp"; static final float FPS = .25; PImage[] images; void setup() { size(600, 500); frameRate(FPS); imageMode(CENTER); images =…

---

<div class="post-metadata">

**Author:** ![mv511](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mv511](https://discourse.processing.org/u/mv511)\
**Post date:** [May 5, 2022, 3:45pm UTC](https://discourse.processing.org/t/files-in-data-folder-not-found-by-ide/36736/5 "2022-05-05T15:45:55Z")

</div>

Thanks, I’ll definetly compare my code with your example, and I’ll gather all the images I need for the project I’m working on.  
Hope things get sorted out, because I was really scratching my head today 🙂

I’ll let you know if things worked out!
