title: Does NOT match substring in batch for loop
body: <p>EDIT: My program takes filetypes as string inputs, then loops through a directory converting matching filetypes. The converted files get prepending with &quot;output&quot;. Currently, the loop runs infinitely if the target filetype and conversion filetype are the same, as it adds each converted file back into the loop.</p>
  <p>How can I get my loop to NOT match on filenames that contain <code>output</code>?</p>
  <pre><code>set /p from=&quot;Enter filetype to convert from: &quot;
  set /p to=&quot;Enter filetype to convert to: &quot;
  
  for %%A in (*.%from%) DO (if findstr /V /I /S /L /C:&quot;output&quot; &quot;%%A&quot; (ffmpeg -i &quot;%%A&quot; -max_muxing_queue_size 9999 &quot;output-%%A.%to%&quot;))
      
  pause
  </code></pre>
  <p>This just errors, but without the negative match it gets stuck in an infinite conversion loop if the filetype variables are the same. Because the loop prepends a &quot;output&quot; to the file, thats what I want to negatively match with.</p>
  <p>EDIT:
  Sample input: mp4 mp4
  Output will just put converted files in the same directory.</p>