How to create m3u playlists with windows command (cmd)

Below is an easy and fast way to create m3u playlists using the windows command.
It works on a windows 7 platform - not sure if if works on older versions or what other requirements are needed.
But if you need a quick solution without any 3rd party software, this is the way to go.
  1. To do so on a Windows CMD:
    1. Click Start, point to Programs, and then click MS-DOS Prompt.
    2. Change directories to the folder that contains the media files for which you want to create a playlist.
    3. Type dir /b>playlist.m3u, and then press ENTER. Or, to write the file names to the playlist in alphabetical order, type dir /b/on>playlist.m3u.



    To do so on a MAC terminal:
    If you use a MAC there is a "terminal" command available as well.
    (Thanks to "stackoverflow" article, which you can find here)

    1. Open Terminal
    2. Navigate to the Volume/Path where your MP3 files are stored.
    3. Use following command to create a .m3u file:
    find . -name '*.mp3' -execdir bash -c 'file="{}"; printf "%s\n" "${file##*/}" >> "${PWD##*/}.m3u"' \;