We want to use a Kotlin exe to set off a different program, and once that is finished check the reports to see if any error files were produced.
If produced the error file(s) always have the same name EXCEPT the user data decides what the file prefix should be. So if the user data decided to prefix it with a datetimestamp then it might be called 20230913_errors_1.csv, or the user data could set the prefix to be something like 'highInflationScenario' so the error file would be highInflationScenario_errors_1.csv
We have a few different error files we need to look out for.
What is the code to use wildcards to ignore the prefix and just look for any file called "_errors_1.csv" (and _errors_2.csv etc). EDIT: these files may not be produced if no errors were detected.
Totally new to Kotlin, first time i have ever used it.
All help appreciated