Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to play a list of music files with sox?

It is possible to play a file by:

play song.mp3

I know I can create a batch file which includes all the files to run such as:

play song01.mp3
play song02.mp3

But I would like to know if there is a setting in sox that simplifies running a list of files.

share|improve this question

play does accept multiple files:

play song01.mp3 song02.mp3 song03.mp3 ...
play song*.mp3

SoX also supports two playlist file formats, m3u and pls. m3u in particular is easy to create, a text file with one filename per line is valid already. When you have such a playlist file, you can run

play favourites.m3u
share|improve this answer

As far as I know play only supports supplying one filename, and there's no "playlist" option. You could have something like GNU find generate a "playlist":

find . -name '*.mp3' -printf 'play %p\n' > cmdfile

Then run cmdfile with your command interpreter.

A better option for playing files and playlists from the command line, IMHO, is mplayer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.