A script is the best way to tackle that. Doing it that way also means you can also do away with the messy Flat View and Select parts.
The script could enumerate the files in the subdirs, generate the appropriate command line for each file, then run the commands.