That is overkill. Code: ls *.mp3 > playlistname.m3u
ls *.mp3 > playlistname.m3u
ls -R | grep mp3 | sort > playlistname.m3u