# Reading files from a folder(s) ...where to start learning?

**URL:** <https://discourse.processing.org/t/reading-files-from-a-folder-s-where-to-start-learning/20761>\
**Category:** Coding Questions\
**Created:** [May 11, 2020, 11:12pm UTC](https://discourse.processing.org/t/reading-files-from-a-folder-s-where-to-start-learning/20761 "2020-05-11T23:12:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eyetoof](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@Eyetoof](https://discourse.processing.org/u/Eyetoof)\
**Post date:** [May 11, 2020, 11:12pm UTC](https://discourse.processing.org/t/reading-files-from-a-folder-s-where-to-start-learning/20761/1 "2020-05-11T23:12:36Z")

</div>

Where should I start if I want to learn about writing my program to look into a folder, and any/all of it’s subfolders, understanding whats there and then doing stuff with the files?

I am working with a program where I draw images from an array. The Array is currently all coded by hand with specific image files for testing and that works just fine.

Now I want to make it so I can easily make new art, Put that as a folder inside my “content” tree and have the art load when I launch the sketch again.

Thanks!  
Toof

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 11, 2020, 11:17pm UTC](https://discourse.processing.org/t/reading-files-from-a-folder-s-where-to-start-learning/20761/2 "2020-05-11T23:17:50Z")

</div>

> [@Is the a "load all text files in a directory" (\*.txt) function in processing?](https://discourse.processing.org/t/is-the-a-load-all-text-files-in-a-directory-txt-function-in-processing/20507):
>
> Hello All, I have a more general question. I have a data analysis program I have been working on that takes in .txt files using loadStrings(). Before I run the program I am manually reformatting the names of the .txt files so loadStrings() can point to a specific filename. I would like to program some code so all .txt files are loaded in without needing to have a specific file location. Really simple example: “This is the full file name and I only want to get JUST THIS PIECE of information…

---

<div class="post-metadata">

**Author:** ![Eyetoof](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@Eyetoof](https://discourse.processing.org/u/Eyetoof)\
**Post date:** [May 13, 2020, 12:27am UTC](https://discourse.processing.org/t/reading-files-from-a-folder-s-where-to-start-learning/20761/3 "2020-05-13T00:27:34Z")

</div>

Chrisir I hope you can get an answer to your question too. I would just like to know where to start, learning how to put this sort of functionality in my program thanks ahead to anyone with some suggestions.

Toof

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 13, 2020, 7:29am UTC](https://discourse.processing.org/t/reading-files-from-a-folder-s-where-to-start-learning/20761/4 "2020-05-13T07:29:22Z")

</div>

err…

I posted the link to a question of somebody else which I did answer in the other discussion.

This answer is also for you. Did you run my Sketch?

Did you see Schred‘s answer?
