title: Translating OS X Bash Script for Windows
body: <p>I use <a href="https://hedge.video/" rel="nofollow noreferrer">Hedge</a> to transfer <a href="https://www.magiclantern.fm/" rel="nofollow noreferrer">Magic Lantern</a> video files shot on my Canon 5D Mark III.</p>
  
  <p>On OS X, I'm able to use Automator to set up a bash script, to execute an <a href="https://builds.magiclantern.fm/experiments.html" rel="nofollow noreferrer">mlv_dump</a> to transfer the files from MLV into cDNG sequences.</p>
  
  <p>The script I use currently is:</p>
  
  <pre><code>cd "$(dirname "$1")"
  for f in "$@"; do
      if [[ -f $f ]]; then
          filename=${f##*/};
          folder=${filename%.*}
          mkdir "${folder}";
  
          ~/mlv_dump --dng $f -o ${folder}/${folder}_;
      fi
  done
  </code></pre>
  
  <p>Can this easily translate into a Windows equivalent?</p>
  
  <p>Thanks,<br />Thomas</p>