title: windows batch .bat automatic .m3u playlist creation / update
body: <p>tired of manually updating my huge mp3/mp4 DB each time i add new files on my computer and/or smartphone, 
  so i'm looking for some help to create a batch file that create/update all my playlists .m3u automatically.</p>
  
  <p>2 batch files are required (1st is calling the 2nd) :</p>
  
  <hr>
  
  <p>1st one is easy, i've almost got it ;-)</p>
  
  <p>create_all_playlist.bat (no arguments required, customized file)</p>
  
  <pre><code>create_m3u.bat  misc-70-80.m3u            misc\70\ misc\80\
  create_m3u.bat  misc-70-80-90.m3u         misc\70\ misc\80\ misc\90\
  create_m3u.bat  misc-60-70-2000-2010.m3u  misc\60\ misc\70\ misc\2000\ misc\2010\
  [...]
  create_m3u.bat  albums-2010.m3u           albums\2010\
  </code></pre>
  
  <p>pretty easy huh?</p>
  
  <hr>
  
  <p>I need your help to write the 2nd .bat, the dynamic one :   </p>
  
  <p><strong>create_m3u.bat <em>output-playlist-name.m3u folder-1 folder-2 [...] folder-n</em></strong> </p>
  
  <p>to play it easy, the output file.m3u should looks like this (note all are <em>relative path</em> and the search for *.mp3 *.mp4 *.ogg (whatever type i cutomize/hard-code) would be <em>recursive</em> into the designated folder)</p>
  
  <p>(raw .m3u compatible with most android &amp; PC player)</p>
  
  <pre><code>misc\2000s\Kelly Rowland - Work (Freemasons Arabic Mix).mp3
  misc\2000s\Keri Hilson - Knock You Down ft Kanye West and Ne-Yo.mp3
  misc\2000s\Kid Cudi vs Crookers - Day n Nite.mp3
  misc\2000s\Korn - Inja.mp3
  [...]
  misc\2000s\Ladyhawke - My Delirium.mp3
  </code></pre>
  
  <hr>
  
  <p>At very best, only for the very best, let's say if someone is skilled enough to produce the full mp3/mp4 TAG reading and formating as following</p>
  
  <pre><code>#EXTM3U
  #EXTINF:227,A-Ha - Take On Me
  misc\80s\A-Ha - Take On Me.mp3
  #EXTINF:257,ACDC - Back in Black
  misc\80s\ACDC - Back in Black.mp3
  #EXTINF:311,Aerosmith &amp; Run Dmc - Walk This Way
  misc\80s\Aerosmith &amp; Run Dmc - Walk This Way.mp3
  [...]
  #EXTINF:289,Alannah Myles - Black Velvet
  misc\80s\Alannah Myles - Black Velvet.mp3
  </code></pre>
  
  <hr>
  
  <p>and thanks!!</p>
  
  <p>for the raw m3u, beers are on me :-)</p>
  
  <p>for the extended full m3u : beers and i'll cook the duck magret  ;-)</p>