batch script for loop teminates the batch <p>I'm trying to use for loop and read contents of a file line by line the file is an xml and contains urls and paths delimited by <code>&lt;&gt;</code> </p> <p>I am using the following code</p> <pre><code>set @LOGFILE=F:\nircmd\hosts.xml :loop for /F "tokens=2-3 delims=&lt;&gt;" %%a in (%LOGFILE%)do echo "it works" timeout /t goto :loop </code></pre> <p>the batch is terminating as soon as it encounters the for loop</p> <p>i have already tried to pause or timeout the batch but nothing seems to work batch is anyway terminating</p> <p>what to do?</p>