That should run just fine as batch script.
If you're entering this in a shell directly, you need to drop one of the percent signs for the loop variable:
set uLimit=5
for /L %i in (1,1,%uLimit% ) do @echo %i
If it's not running as a batch script, make sure you're using cmd.exe (32bit NT Shell), NOT command.com (16bit DOS).
Main Topics
Browse All Topics





by: milindsmPosted on 2009-11-05 at 23:13:31ID: 25757215
@echo off
SET cnt=0
Goto loop
:loop
SET /a cnt = cnt +1
IF %cnt% == 6 goto :eof
echo %cnt%
goto loop