# Storing Files in a Folder

**URL:** <https://discourse.processing.org/t/storing-files-in-a-folder/20265>\
**Category:** Coding Questions\
**Created:** [April 29, 2020, 1:30pm UTC](https://discourse.processing.org/t/storing-files-in-a-folder/20265 "2020-04-29T13:30:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.processing.org/u/Jack)\
**Post date:** [April 29, 2020, 1:30pm UTC](https://discourse.processing.org/t/storing-files-in-a-folder/20265/1 "2020-04-29T13:30:52Z")

</div>

Hello,

I am working on a project currently where I have about 80 images to use. I would like all of these images to be in an array. As this number of images makes the files look cluttered, I would like to be able to store them all in a file called images, however I am unsure of how to tell Processing to fetch things from another folder and examples I have seen are currently not helping me, but I could be looking for incorrect keywords.

Thanks,  
Jack

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [April 29, 2020, 1:48pm UTC](https://discourse.processing.org/t/storing-files-in-a-folder/20265/2 "2020-04-29T13:48:22Z")

</div>

It depends on what OS you are using, you want to use a fully qualified file name see [https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file) for Windows. But say you are using Unix (linux MacOS) it’s bit easier eg “/home/user/my\_images/image.png” substituting user etc as appropriate.

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.processing.org/u/Jack)\
**Post date:** [April 29, 2020, 1:51pm UTC](https://discourse.processing.org/t/storing-files-in-a-folder/20265/3 "2020-04-29T13:51:55Z")

</div>

I moreso meant, if I were to create a folder within the project folder and put all the images in there, how would I get processing to look into that folder when loading the images from the array?

---

<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:** [April 29, 2020, 1:56pm UTC](https://discourse.processing.org/t/storing-files-in-a-folder/20265/4 "2020-04-29T13:56:34Z")

</div>

> [@File Listing Order](https://discourse.processing.org/t/file-listing-order/7148/41):
>
> [Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/Arrays.html#sort(java.lang.Object[])](http://Docs.Oracle.com/en/java/javase/11/docs/api/java.base/java/util/Arrays.html#sort(java.lang.Object%5B%5D)) static final String PICS\_EXTS = "extensions=,png,jpg,jpeg,gif,tif,tiff,tga,bmp,wbmp"; static final float FPS = .25; PImage[] images; void setup() { size(1200, 600); frameRate(FPS); imageMode(CENTER); final File dir = dataFile(""); println(dir); String[] imagePaths = {}; int imagesFound = 0; if (dir.isDirectory()) { imagePaths = listPaths(dir.getPath(), "files", "recursi…
