PDA

View Full Version : [ubuntu] How to change mass groups of filenames of mp3's?



kramer65
June 27th, 2008, 09:09 AM
Hello,

I recently switched from xmms to Audacious for my music playing. It is a little better than xmms, but Audacious has one drawback. It doesn't play mp3's which have an '&' sign in the filename. Now I need to edit all my mp3's names to change '&' to 'and'.

How would I be able to do that?

bluefrog
June 27th, 2008, 09:14 AM
for i in *.mp3; do mv "$i" "${i//&/and}"; done

kramer65
June 27th, 2008, 09:16 AM
Sorry. That's a bit too fast.

Ehm. I guess this is with the command line. So I need to 'cd' to the folder and than use that line?

bluefrog
June 27th, 2008, 09:20 AM
yes or if your music is in the /home/$USER/Music folder you could also:

for i in $(find ~/Music -name *.mp3); do mv "$i" "${i//&/and}"; done

logos34
June 27th, 2008, 09:41 AM
Audacious has one drawback. It doesn't play mp3's which have an '&' sign in the filename.

didn't know that. that's some oversight on the devs part!

jay019
June 27th, 2008, 01:09 PM
didn't know that. that's some oversight on the devs part!

Wow, news to me to. I try to avoid any non alphanumeric characters in filenames as a general rule tho.

Some programs in the "Add/Remove Applications" that do mass/batch file renaming:
KRename
GwenRename
Bulk Rename
Purrr
PrefixSuffix

Hope that helps

Inxsible
June 27th, 2008, 01:13 PM
install EasyTag. its in the repos..

you can not only change filenames but also edit id3v tags using it.

kramer65
June 27th, 2008, 04:13 PM
Great!

The command line thingy worked perfect!

All the programs will come in handy as well!

Thanks for all the tips!