title: Recursive ffmpeg batch script within Windows
body: <p>Complete change to the question!</p>
  
  <p>I now have the following script:</p>
  
  <pre><code>@echo off
  REM keep a counter for files converted
  set /A nfile=0
  REM do not copy empty folders or any files
  @echo Copying directory structure from %0 to %1 ...
  xcopy /T %1 %2
  REM walk directory structure and convert each file in quiet mode
  for /R %1 %%v in (*.mp4, *.aac, *.flv, *.m4a, *.mp3) do (
      echo converting "%%~nxv" ...
      ffmpeg -v quiet -i "%%v" -vcodec libx264 "%2\%%~nv-converted.mp4"
      set /A nfile+=1
  )
  echo Done! Converted %nfile% file(s)
  </code></pre>
  
  <p>Taken from: <a href="http://mostlybuggy.wordpress.com/2012/09/25/windows-batch-file-how-to-copy-and-convert-folders-recursively-with-ffmpeg/" rel="nofollow">http://mostlybuggy.wordpress.com/2012/09/25/windows-batch-file-how-to-copy-and-convert-folders-recursively-with-ffmpeg/</a></p>
  
  <p>The videos are converting as expected when I run the following command: </p>
  
  <pre><code>convert ..\..\folder ..\..\converted\
  </code></pre>
  
  <p>However, the converted files end up in "converted" and not in their respective sub-folders. </p>
  
  <p>Any ideas?</p>