title: Windows Batch: replace semicolon with underscore in filename
body: <p>I want to use ffmpeg via windows batch to convert .wav files and put them in a new directory. For each file, I want to do the command</p>
  
  <pre><code>ffmpeg -y -i H:\input\file_10;18;33.wav H:\output\file_10_18_33.wav
  </code></pre>
  
  <p>Notice that the ; in the old filename are replaced by _ in the new filename.</p>
  
  <p>So I will have to do something like</p>
  
  <pre><code>for %f1 in (H:\input\*.wav) do ffmpeg -y -i %f H:\output\%f2
  </code></pre>
  
  <p>But meanwhile, %f2 should be the filename of %f1 with the semicolons replaced by underscores. How can I do this?</p>