title: Convert multiple images in Imagemagick (Windows)
body: <p>I'm trying to convert multiple <code>.tif</code> files into <code>.png</code> files using Imagemagick on the Windows command line. I tried the following, which didn't work:</p>
  
  <pre>convert -format tif *.png</pre>
  
  <p>I then tried a loop</p>
  
  <pre><code>for %a in (*.tif) do convert %a %a.png
  </code></pre>
  
  <p>which did work but now all my images are named as <code>[something].tif.png</code>, which is annoying. </p>
  
  <p>So why didn't the first command work, and if there's no way to get the first command to work, is there a way to improve the second command so I won't have to deal with the <code>.tif</code> in the <code>.png</code> image name?</p>
  
  <p><strong>Edit</strong> It seems that I got the first command wrong. First of all, <code>convert</code> doesn't work but <code>mogrify</code> does. I had read that mogrify replaced the files of the old format, but apparently it isn't true because it created new images for me without deleting the old ones. Secondly, it seems that the destination file type comes first, so the command is</p>
  
  <pre><code>mogrify png *.tif
  </code></pre>
  
  <p>which works perfectly.</p>
  
  <p>I'd still like to know how the second command could be improved.</p>