How to do a batch loop to iterate the numbers

0

I need to make a batch file that iterates the numbers for example from 1 to 25, so the script that I was trying was such that.

loop x
firefox.exe -CreateProfile userx

So I wanted to iterate the character x, from 1 to 25, to create 25 users but I'm not sure how to do it since I'm a bit of a novice in programming. How could you iterate the numbers using batch?

    
asked by Sergio Ramos 28.06.2018 в 00:40
source

1 answer

0

to iterate we use for /L %n in (inicio,incremento,fin) do comando %n

example:

for /L %n in (1,1,25) do @echo user%n

in your case it would be something like this:

for /L %n in (1,1,25) do @firefox.exe -CreateProfile user%n
    
answered by 28.06.2018 в 01:36