# File Listing Order

**URL:** <https://discourse.processing.org/t/file-listing-order/7148>\
**Category:** Coding Questions\
**Created:** [January 4, 2019, 4:43am UTC](https://discourse.processing.org/t/file-listing-order/7148 "2019-01-04T04:43:52Z")\
**Posts on this page:** 1\
**Showing post:** 23

<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:** [January 5, 2019, 11:02am UTC](https://discourse.processing.org/t/file-listing-order/7148/23 "2019-01-05T11:02:10Z")

</div>

> [@kll](#):
>
> Exactly, but I could not see that from your above code.

When I need to code a very simple sketch, w/o any animations or even functions, I use what is so called “static sketch”.

The standard 1 is called “interactive sketch”, in which we can have the callbacks **setup()** & **draw()**.

More info on them here: [Processing Overview / Processing.org](http://Processing.org/tutorials/overview/)

Here’s the my “static sketch” converted to “dynamic sketch”: 😀

```java
static final String PICS_EXTS = "extensions=,png,jpg,jpeg,gif,tif,tiff,tga,bmp,wbmp";

void setup() {
  final File dir = dataFile("");
  println(dir);

  String[] imagePaths = {};
  int imagesFound = 0;

  if (dir.isDirectory()) {
    imagePaths = listPaths(dir.getPath(), "files", "recursive", PICS_EXTS);
    imagesFound = imagePaths.length;
  }

  printArray(imagePaths);
  println("Found", imagesFound, "image(s)");

  exit();
}

```

---

_[View the full topic](https://discourse.processing.org/t/file-listing-order/7148)._
