Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Finder.app, the multi-song MP3 player' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Finder.app, the multi-song MP3 player
Authored by: ssevenup on Feb 18, '03 03:39:51AM

This shell script (make_m3u.sh) will decend one level and create a playlist in each specified directory.

<code>
#!/bin/sh
# make_m3u.sh

set -o errexit

for s in "$@"; do
cd "${s}"
if [ -f playlist.m3u ]; then
echo "skipping "$s"; already done"
else
find . -name '*.[Mm][Pp]3' >playlist.m3u
fi
cd ../
done
</code>

So for my situation I "cd" to the "artist" directory and "make_m3u.sh *" will do the trick. This makes this tip a bit more useful. Eventually I would like to make it just work on the whole iTunes directory.

---
Mark Moorcroft
ELORET Corp. - NASA/Ames RC
Sys. Admin.



[ Reply to This | # ]
Finder.app, the multi-song MP3 player
Authored by: gcianci on Nov 21, '04 02:26:31PM

Thanks for the nice shellscript. Might I suggest changing the string

playlist.m3u

to

"${s}"

This way the playlists have the same name as the album they describe...



[ Reply to This | # ]