title: check "IF" condition inside FOR loop (batch/cmd)
body: <p>The code I need to implement in a Windows batch file is like this (it is currently in Perl):</p>
  
  <pre><code>while(&lt;file&gt;)
  {
     if($_ =~ m/xxxx/)
     {
        print OUT "xxxx is found";
     }
     elsif($_ =~ m/yyyy/)
     {
        next;
     }
     else
     {
        ($a,$b) = split(/:/,$_);
        $array1[$count] = $a;
        $array2[$count] = $b;
        $count++;
     }
  }
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Is this level of complexity possible in Windows batch files?</li>
  <li>If so, how can I put an If condition
  inside a for loop to read a text
  file?</li>
  </ol>
  
  <p>Thanks for your attention. If you know the answers, or have any ideas/clues on how to reach the answer, please share them.</p>
  
  <p>EDIT: I am working in Windows. I can use only whatever is provided with Windows by default and that means I cant use Unix utilities.</p>