Mog is pointing in the right direction with f25_dir.bas.
You should search programmatically for the "*.jpg" filename strings by backing up and down from your app's directory. All directories that you will access will be relative to the position where your app finds itself. So you should keep track of where you are in the directory structure and test validity of dirs to avoid error commands while programmatically exploring the directories on device.
FILE.DIR "../../DCIM/Camera/", Array$ % For example Back down and go to DCIM/Camera/ is valid on my phone
DIALOG.SELECT Index, Array$
GR.MODIFY Screen1[TxtBtn1], "text", Array$[Index]