How to Write a Batch Program Using For Through Numbers
Batch Program Using For Through Numbers.
Step 1:
1.Open Notepad
2.Type your Program
3.Save your file as .bat eg. script.bat
Batch Program For Through Numbers
@echo off
setlocal enabledelayedexpansion
goto :main
:main
setlocal
For /L %%A in (0,4,20) do echo %%A
endlocal
goto :eof
Output:
0
4
8
12
16
20
Snaps For Reference:
Comments
Post a Comment