How to make a Windows batch file exit when a file exists in the file structure?

Posted by Someone on Stack Overflow See other posts from Stack Overflow or by Someone
Published on 2010-04-10T11:33:29Z Indexed on 2010/04/10 11:53 UTC
Read the original article Hit count: 269

Filed under:
|

Hi, 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

© Stack Overflow or respective owner

Related posts about dos

Related posts about batch-file