I want to make something like this…
:LoopBegin
if ???? goto End
some other work goes here*
gotoLoopBegin
:End
The “????” part should be a check that a file exists with the name “exit.txt” for example. If such a file exists in the current folder, I want the batch file to just exit. Is there a way to do this?
Thanks
See
if /?from a command prompt for more details of what is possible. Also noticegoto :EOFwill always goto the end, without needing an explicit label.