My use case is as follows.
I have several files, being placed in a directory, with a naming convention similar to MYNAME.*.txt where * is A, B, etc.
I want to have a single job to execute on all files matching MYNAME.*.txt and then send the data to A.txt, B.txt, etc. If a file is MYNAME.A.txt I only want to update A.txt.
I currently have implemented a basic workflow reading the files and then using a case statement to send, based on filename, to whichever output filename is appropriate.
However, this means that if there is only one file to load (MYNAME.A.txt) an empty txt is created for all conditions of the case statement (B.txt will be blank).
Is there a way to only execute a case statement if there is data or if it matches a filename?
In pseudo code, I want something like:
Case (letter){
Case A: generate a.txt
Case B: generate b.txt
}
Rather than basically executing all cases, but only sending filtered data to each.