I have a batch file test.bat
I understand we can give it multiple arguments and take those values using %1, %2, and so on. But I do not know how many arguments will be given. I thought of constructing an array and for loop to decide. But the point I am failing is constructing the for loop.
what I did is:
set count=0
// for loop until we have arguments left
set list[%count%]=%var%
set /A count=count+1
I know little bit of for loop in batch files, but I do not quite understand how to use in this scenario. Number of arguments are unknown. Any direction would be appreciated?