File Selection Loop - Create Custom Batch of Images in Different Folders to Process

I am converting a rs project for doing custom bulk image formatting to Xojo so I need no longer have to rely on a png plugin.

I have the code working for selecting and processing one image file or selecting a folder and processing only those images in the folder that match certain file types. Both of these options allow the user to either auto save the outputted image(s) to the same parent folder of the original image chosen (no save dialog) or choose the folder to save them to via a dialog window. Outputted images are saved using the original image’s name plus an additional prefix inserted before the file extension so the original selected image is not overwritten. Auto saved images overwrite any previously outputted images of the same name.

I was thinking of adding another way of choosing images. Because all the images the user may want to process are not in the same folder I wanted to let the user to continually choose image files in different folders and then process all the images in one batch similar to choosing all the images in a single folder.

So would it be possible to continually present the user with a dialog window to select one or more images in different folders until the user dismissed the last dialog window, at which time the images were to be processed? Essentially, its a loop of image selection dialog windows that is exited upon dismissing the last dialog window. The app would of course need to keep track of the locations of the images from each dialog selection window. Each dialog selection window should allow for multiple file selections in the same folder.

Or I am stuck having the user press a button each time they want to add a group of images to the batch of images to be processed? This way would be easier to code, but perhaps less prone to crash, although the user will need to press the button to initiate a selection several times as opposed to once. I am thinking the selection loop might violate generally accepted app interfaces even if it works.

I would let the user select some files and add them to a listbox, then have a button to select more files and another button to process the selection. Save the FolderItem for each file as the RowTag of the listbox row.