Software >> OS >> Windows >> Command Line >> For >> How to use FOR to loop thru a range of variables



eg.
 

## In batch file :

FOR /L %%a in (1,1,254) DO @tracert  172.31.5.%%a
 

## On a command line:

FOR /L %a in (1,1,254) DO @tracert  172.31.5.%a