I swear I wrote an article on this very subject like 2 years ago. However its not on google or any other indexing site so.
Here goes how to do this in Windows (any version (any that can understand a exe or bat file (to which is all(come on correct me please.)))).
Playlist generators are a plenty on the interwebs. None that I can find are free. All basically use this formula to create a playlist:
“ dir /o:n /b *.mp3, *.wma, *.ogg, *.whateveryouwant > HappyPlaylist.m3u “
This will simply create a playlist with all the files found in the specific directory you run it in.
Now for the sugary easy of running without having to see the command line.
Create a new text document. Call it my playlist.bat
copy this to the text inside the bat.
dir /o:n /b *.mp3, *.wma, *.ogg > Playlist.m3u
After that is pasted save and copy the bat to your music folder and double click. you will see a new file created called playlist.m3u. Now you can double click it and run it in your favorite media player.