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

Popular posts from this blog

How to use DIR Command

How to Write Your First Batch Script Progarm

How to use ECHO Command