batch loop
3:43
Added: 3 years ago
From: toimelin
Views: 3,695
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (10)

Sign In or Sign Up now to post a comment!
  • @echo off

    :a

    start filename.cmd

    goto a

  • 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.

  • 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

  • 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.

  • @sparkytycoon

    try "for loop" then

  • @sparkytycoon same

  • tha one sucked. ive made better loops

  • 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.

  • you forgot the pause

    @echo off

    :loop

    start notepad.exe

    pause

    goto loop

  • No i didn't, it was not needed for the batch file i was doing

  • 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!

  • I am with that dude. Short, sweet, and to the point.  Thanks for not polluting youtube with CRAP!

  • Glad you liked it.

  • Thanks! I had to know this! Nice and simple... :)

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more