Created
July 14, 2015 18:53
-
-
Save parastuffs/1c8f4da5847dda1434db to your computer and use it in GitHub Desktop.
Rename all mp3 files in folder into "Artist - Track title.mp3" base on mp3 tags.
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
#!/bin/bash | |
# Rename all mp3 files in folder into "Artist - track title.mp3" base on mp3 tags. | |
# Requires mp3info | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b"); | |
for f in `ls *.mp3`; do | |
artist=`mp3info -p %a $f` | |
title=`mp3info -p %t $f` | |
mv ${f} "${artist} - ${title}.mp3" | |
done | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment