title: How to use JpegTran to recursively process all images, overwriting them, in a directory using Windows?
body: <p>Right now I have the following batch file that I use to process my images:</p>
  
  <pre><code>@echo none 
  cd %1 
  md "%~1\ProcessedJPEGS"
  for %%i in (*.jpg) do "C:\Program Files\Image Optimization\jpegtran.exe" -optimize -progressive -copy none "%%i" "%~1\ProcessedJPEGS\%%i" 
  move /Y "%~1\ProcessedJPEGS\*.*" "%~1" 
  rd "%~1\ProcessedJPEGS" 
  pause
  </code></pre>
  
  <p>As you can see, this is not ideal but my skills are laughable at best so I need some help here :)</p>
  
  <p>What I want to accomplish is to run this batch in a directory and process all images recursively and overwrite them.</p>
  
  <p>Thanks in advance,
  Arky</p>