So basically I have been looking all over the internet trying to find a good way of doing this: Create a limited loop in my batchfile program. I have found no answer. An example I tried is this:
@echo off
echo Hello this is your program.
pause
set i= 0
: test
set i= i + 1
if %i% == 5 goto exit
goto test
: exit
echo good
pause
exit
I later found out that I can't just make the "i" variable like that. When I try to make it a variable it makes me put an input in the command prompt of the program and I don't want that. I want this to run maybe 5 times, then quit running and go to something else. If you can answer and help me thanks.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments