Creating a program in SNAP

Hi all, I am new to SNAP and maybe my question is quite absurd, but I think you can help me.
I want to develop a scrip in snap to be able to get only certain images of a folder and then treat them with some SNAP functions.
The thing is that I want to be able to do something like walk through the files of a folder, and get a part of the name of the images, and execute a function over some of them (the images which are matches to the obtained name).
I know that SNAP is developed in JAVA, I would like to know two things.
Is it possible to do something like what I want to do?
If so, do I have to code in JAVA or in python?
Thank you very much.

I think you have three options.
You can implement a little application in Java, but I assume that’s not your prevered way.
The second options is to write a Python script and use snappy as the bridge between SNAP and Python (see Using SNAP in your programs). and the last option is to write a Windows batch or a Unix bash script to iterate over the files and then execute gpt on the images you want to process (see Bulk Processing with GPT).
Which option is the best for you depends on your programming skills and the functions you want to apply on the images.

Thank you very much! this was very usefull… Maybe the best option for us is to write a bash script yes.
Thanks!