As there is no predictable pattern for the parameters, generating this from a formula looks to be unreliable.
You can build a text file with all the possible parameters sets and just loop through it. For simplicity, make sure that the text file and batch file are in a folder that has no spaces in the path or file name or this command will fail.
The Text File called "Commands.txt" in same folder as batch file:
You have shown a list of example file names, but you did not explained how the file names must be processed, so I got my old crystal ball, cleaned it and asked it: "what this problem is about?" and this was the answer:
"Giving a list of file names comprised of several parts separated by underscore and a list of numbers, select a different number as parameter each time that a new file name differs from the previous one in the first three parts".
So this is the solution:
EDIT: After the OP had finally gave us the right method, this is the correct solution:
for /F "tokens=1-3* delims=_" %%a in ('dir /B /A-D *.csv') do (
set /A number=%%b*%%c*12/100
MMDSv1.0.exe %%a_%%b_%%c_%%d !number!
Asked in February 2016Viewed 1,113 timesVoted 10Answered 3 times