Created
September 25, 2012 16:25
-
-
Save dasgib/3782943 to your computer and use it in GitHub Desktop.
Copy all songs in a .m3u file exported via iTunes to a new directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IFS=$'\n'; mkdir playlist; for FILE in `tr "\r" "\n" < playlist.m3u | grep -v "^#"` | |
do | |
SONG=`basename $FILE` | |
ALBUM=`basename ${FILE/$SONG//}` | |
ARTIST=`basename ${FILE/$ALBUM\/$SONG//}` | |
cp $FILE "./playlist/$ARTIST - $ALBUM - $SONG" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment