I need to iterate over a list of numbers inside a DOS batch file. I have tried this:
for /l %%n in (10,13,14,15) do (
REM do something
)
But this doesn't seem to to work. What is the right syntax? There is very little proper documentation on batch file on www.
Try this
@echo off
set nums=10,13,14,15
for %%i in (%nums%) do (
echo %%i
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With