3

I am using Ubuntu 11.10 (I don't think that really matters) with Bash.

How can I make a music playlist out of a .txt file? It is a command but I forgot it. I would appreciate it if someone would write a tutorial.

3 Answers 3

4

You have to go to the folder of the music, than type:

ls > music.txt

The .txt file can be named what ever you want. The ls uses all the files in the folder, listing them and the > redirects the command to a .txt. Than press Enter or Return and that's it. If you are using mplayer for example, you type

mplayer -playlist music.txt
1

There are many playlist formats.

M3U is a simple plain text file format for playlists. Where each line is a location (this can be a relative path, an absolute path or a URL). Example (a_playlist.m3u):

./cat_dna.mp3
/foo/bar/Eternal Wheel.flac
http://example.com/sploosh.ogg

With mplayer I could play the above like so:

mplayer -playlist /path/to/a_playlist.m3u
0
find /path/music -type f -iname "*.ogg" > myplaylist.txt

for other extension just change *.ogg example for mp3 *.ogg to *.mp3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .