I have an old MS DOS computer running DOS 7.10 (ver command gives: windows 98 ver 4.10.2222). I have to make a batch script that basically runs a command 10 or whatever times. I tried using the for command but it gave me ILLEGAL Command For So now I have:
@ECHO off
SET COUNT=0
:MyLoop
IF "%COUNT%" == "10" GOTO EndLoop
ECHO %COUNT%
SET /a COUNT+=1
:EndLoop
ECHO done
However, this gives me an infinite loop of 0 as if set command is not working. The command DOES work in CMD in windows 10 though. Can anyone suggest what I am doing wrong? Or a way to implement a for loop in DOS 7 batch file.