# How can I rename, annotate name or save to sub-directory images in a folder following classification?

**URL:** <https://discourse.processing.org/t/how-can-i-rename-annotate-name-or-save-to-sub-directory-images-in-a-folder-following-classification/31100>\
**Category:** Beginners\
**Created:** [July 7, 2021, 8:26am UTC](https://discourse.processing.org/t/how-can-i-rename-annotate-name-or-save-to-sub-directory-images-in-a-folder-following-classification/31100 "2021-07-07T08:26:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tegan](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tegan](https://discourse.processing.org/u/Tegan)\
**Post date:** [July 7, 2021, 8:26am UTC](https://discourse.processing.org/t/how-can-i-rename-annotate-name-or-save-to-sub-directory-images-in-a-folder-following-classification/31100/1 "2021-07-07T08:26:54Z")

</div>

I am running a basic image classification model (trained on the teachable machine) but now want to be able to annotate the file names or move them to a sub directory based on the classification. I would prefer not to copy them.

---

<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:** [July 7, 2021, 8:59am UTC](https://discourse.processing.org/t/how-can-i-rename-annotate-name-or-save-to-sub-directory-images-in-a-folder-following-classification/31100/2 "2021-07-07T08:59:08Z")

</div>

> **[File renameTo() method in Java with examples - GeeksforGeeks](https://www.google.de/amp/s/www.geeksforgeeks.org/file-renameto-method-in-java-with-examples/amp/)**
>
> A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

---

<div class="post-metadata">

**Author:** ![Tegan](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tegan](https://discourse.processing.org/u/Tegan)\
**Post date:** [July 7, 2021, 9:38am UTC](https://discourse.processing.org/t/how-can-i-rename-annotate-name-or-save-to-sub-directory-images-in-a-folder-following-classification/31100/3 "2021-07-07T09:38:37Z")

</div>

Thanks this helps me to explore further. I should have been clearer I working in p5.js so hoping for something compatible with javascript. I am used to working with processing so clearly missing a bunch of information on how directories and files work with javascript.
