title: How to batch convert RAW images in several subfolders to DNG
body: <p>So I have 20 subfolders full of files in my main folder and have around 200 files in every subfolder. I've been trying to write a script to convert <strong>every picture</strong> in <strong>every subfolder</strong> to DNG.
  I have done some research and was able to batch convert images from the current folder.
  I've tried developping the idea to get it to work for subfolders but to no success.
  Here is the code I've written:</p>
  
  <pre><code>for D in 'find . -type d'; do for i in *.RW2; do sips -s format jpeg $i --out "${i%.*}.jpg"; cd ..; done; done;
  </code></pre>