Software >> OS >> Windows >> Command Line >>  What is the difference in for syntax in command line and batch files

In batch files variables should be referred as %%%%variable On command lines variables should be referred as %%variable eg. to loop using for In command line @FOR /L %%a in (1,1,254) DO @echo 172.31.5.%%a In batch file @FOR /L %%%%a in (1,1,254) DO @echo 172.31.5.%%%%a