PDA

View Full Version : [all variants] Music files got copied over without extension (.mp3)



ubuntuman001
May 30th, 2011, 07:14 PM
I got around 6,000 songs that I copied from my ipod to my external hard drive through rhythmbox, but for some reason it didn't copy over any extensions (all of my music files are mp3's) so I was wondering what would be a really simple way to add the extension to all the files in the music folder. My folders are setup like /Music/Artist/Album/song.mp3 (well right now there is no .mp3 but ya get the point :)

lordadi
May 30th, 2011, 07:20 PM
You'd have to use scripting, are you comfortable with this idea?

You basically need to modify this (http://www.thingy-ma-jig.co.uk/blog/19-04-2008/how-batch-rename-files) to suit your needs. I think that should do it.

flick
May 30th, 2011, 07:23 PM
Looks like a bug has been filed, but not much work done on it yet :

https://bugs.launchpad.net/ubuntu/+source/banshee/+bug/700257

ubuntuman001
June 4th, 2011, 01:31 AM
You'd have to use scripting, are you comfortable with this idea?

You basically need to modify this (http://www.thingy-ma-jig.co.uk/blog/19-04-2008/how-batch-rename-files) to suit your needs. I think that should do it.
I don't know much scripting, I wouldn't really know how to modify that...:(

Toz
June 4th, 2011, 02:22 AM
Before I provide a solution I must make a warning.
Make a backup of your mp3 files before proceeding.
Make absolutely sure that you run this script at the base directory of where your mp3 files are and not anywhere else. Be doubly sure!

Here is a command you can type in a terminal window that will append .mp3 to all files in a directory structure. Again, make sure you execute the command at the base directory of your mp3 files. For example, if all of your mp3 files are located in your ~/Downloads/mp3 folder, then:

Open a terminal window (did you backup the files?)

cd ~/Downloads/mp3

find . -type f | xargs -t -i mv {} {}.mp3