I have created one batch macro but it is not updating the parameter. I need to run that macro 4 times and it ran 4 times but it is not updating the value where it should be updating the values in two areas. I have posted two pictures of my two workflows.
Its hard to say without a copy of the macro to look at, but if I had to guess I would say its something to do with the setup of your action tools.
Can we see how those are setup? Are the two control parameters being fed the same field or different fields?
Are you able to upload a copy with sample inputs so we can see the macro in action?
And format of this file name is look like "12345_B-24_first.txt".
Im not really seeing anything particularly wrong with it.
What is it doing that makes you think its not updating your values?
I made some slight adjustments to the macro to give it an output anchor to make it easier to see what it is doing, and it looks to be updating just fine.
I had to adjust it to work on my machine, but they were pretty minor edits. I used your sample file and made additional copies so I had a total of 4 files. I then made copies of those and added an extra line to two of them and made the output give me the file name and a count of the rows with 'DET'
It ran 4 iterations and the output shows that two of the files have an extra line which is exactly what I would expect.
I attached a copy of the workflow with my adjustments as well as a zip file with the 8 files I used.