title: Batch file with mogrify into folders
body: <p>I can shrink some images with imagemagick using mogrify in a batch file but I'm having trouble setting the destination directory</p>
  
  <pre><code>@ECHO OFF
  SET scriptdir=%~dp0
  cd /d %imagedir%
  SET tb="thumbs"
  IF NOT EXIST "%imagedir%"/%tb% MKDIR "%imagedir%"/%tb%
  FOR %%a in (*.tif) do (
  mogrify -resize 42x42 -format jpg -quality 100  %%a
  move %%a %imagedir%/%tb%
  )
  </code></pre>
  
  <p>The above script does what I want, but it's bugging me that I have to use move command to place the images there instead of creating them there.</p>