This barely counts as a loop. Ive been searching to do a loop for like 3 hours. and all i found was this GOTO shit. Bull GOTO only redirects you to a certain point. Whether it be up from its command colom or down. Looping is reperforming a series of commands a certain number of times. this only does it once. or does it until program shutdown. Depends on program value settings.
@echo off
:a
start filename.cmd
goto a
CashmoneyNinetyNine 5 months ago
This barely counts as a loop. Ive been searching to do a loop for like 3 hours. and all i found was this GOTO shit. Bull GOTO only redirects you to a certain point. Whether it be up from its command colom or down. Looping is reperforming a series of commands a certain number of times. this only does it once. or does it until program shutdown. Depends on program value settings.
sparkytycoon 2 years ago
true it's not a programmed loop but since it loops i called it a loop, easier for people to search for it to. It works, that is what is important
toimelin 2 years ago
if you add this:
set /a "i=%i%+1"
if %i%=[a number of times to run the loop] goto [somewhere else]
you get something that works like a do, while loop in c++ if that is what you want.
2testtest2 2 years ago
@sparkytycoon
try "for loop" then
antontonybekker 7 months ago
@sparkytycoon same
BULD0SIS 5 months ago
tha one sucked. ive made better loops
SnuppyProductions 2 years ago
So what is it really that sucks about it?
It does what it was made to do, simple as that.
I wouldn't call a loop bad or good, a loop is a loop.
toimelin 2 years ago
you forgot the pause
@echo off
:loop
start notepad.exe
pause
goto loop
Tvvee2er 3 years ago
No i didn't, it was not needed for the batch file i was doing
toimelin 3 years ago
If you use "pause" you'll have to press enter everytime for it to run, which takes the edge of the script. Great tutorial toimelin!
iDrinQ 3 years ago
I am with that dude. Short, sweet, and to the point. Thanks for not polluting youtube with CRAP!
Shatmess 3 years ago
Glad you liked it.
toimelin 3 years ago
Thanks! I had to know this! Nice and simple... :)
Maupert90 3 years ago