Is it possible to break loop?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Squashman
Expert
Posts: 4114
Joined: 23 Dec 2011 13:59

Re: Is it possible to break loop?

#31 Post by Squashman » 08 Jun 2016 19:59

Exiting a FOR /L is a whole different concept. We have a thread about it on the forums.

sambul35
Posts: 192
Joined: 18 Jan 2012 10:13

Re: Is it possible to break loop?

#32 Post by sambul35 » 08 Jun 2016 20:27

If you mean Infinite [FOR /L] loop with break condition, at quick reading the suggested solutions look too complex for my above task, and alternatively FINDSTR is slow in loops. Though this approach with the :WHILE function or that "restart the batch" one look promising. Also it shows, the way to create an infinite FOR /L loop is leave the count numbers undefined inside () parentheses, but the "increment the limit" task complicates things. May be setting a fixed end limit, or using infamous GOTO to simplify things and keep an eye on the batch ball would suffice. :wink:

Post Reply