Create m3u playlist from a folder and place in directory

  • In Linux how would we create an m3u playlist of mp3 files in a directory?

    In windows, we can say..use PHP and a bat file
    like so.

        system("c:\WINDOWS\system32\cmd.exe /c C:\\ezstream\\PlaylistRefresh-imm.bat");    
        header('Location: playlists.php');

    Then the bat file

    @echo off
    REM ***working directory***
    cd \ezstream\
    >nul chcp %ACP%
    dir imm /o:n /b *.mp3 *.flac > imm/Playlist.m3u

    This gives us a playlist from the mp3 in a folder called "imm"
    How would this be done in Linux as there is no bat file rather an exe or better yet in PHP to generate the list?

  • Wish I could help buddy @MPG-Radio

  • When I manage to solve I would be happy to post an answer.

  • Sounds good @MPG-Radio Thanks!

Log in to reply