[xubuntu-users] Renaming mp3 files from meta data
Kiyotaka Nemoto
kiyotaka at nemotos.net
Sun Jan 11 19:55:55 UTC 2015
Hi Andy,
I wrote a tiny batch script which does what you want.
The script depends on libimage-exiftool-perl package, so please
install the package beforehand.
It's in universe repository, so installation is pretty simple.
$ sudo apt-get install libimage-exiftool-perl
After that, please place the attached script (meta2mp3.sh) somewhere in your PC.
Then make it executable by
$ chmod +x meta2mp3.sh
Please look inside the script.
Around line 42, you will see
newname=`echo "${Track}-${Title}-${Artist}-${Album}.mp3"`
As you guess, if you change the order of variables, you will get any
filename you want.
Usage of this script is simple.
$ meta2mp3.sh *.mp3
will rename all of mp3 files.
Please make backup copy of your salvaged mp3 files first and give it a
try if you like.
My circumstance is Xubuntu 14.04 and it worked well in my circumstance.
Hope this helps,
Kiyotaka
2015-01-11 23:56 GMT+09:00 Andy Proctor <xubuntu.list at gpshelp.co.uk>:
> All,
>
> I have an interesting problem and I wonder if anyone in the group knows a
> way to solve my problem.
>
> Following a backup disk partition table meltdown I had to use
> Testdisk/Photorec to recover the files on the disk and this was pretty
> successful, over 42,000 files recovered, lots of my photos, documents and
> music recovered. I have separated each file type and Photorec was somewhat
> successful in extracting filenames from document meta data, but thats about
> it. My current challenge is to organise over 1200 mp3 file helpfully with
> the file names like f6920578.mp3 or f8493023.mp3. Opening the files with
> gmusicbrowswer it is clear that the meta data is still present in the files
> and gives artist, title and album.
>
> To save me opening >1200 files one by one, there must be a way to read the
> meta data and rename the file or as a minimum sort by meta data? A web
> search has not produced many pearls of wisdom, apart from a program called
> mp3tag which is unfortunately M$Windows based.
>
> Any wisdom from the experts on this list at all please?
>
> Running xubuntu 14.10 on an asus 1225b kernel 3.16.0-28 if that helps. I'm
> not a total newbie but not a programmer either :)
>
> Thanks
>
> Andy
>
> --
> xubuntu-users mailing list
> xubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/xubuntu-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meta2mp3.sh
Type: application/x-sh
Size: 1420 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/xubuntu-users/attachments/20150112/cd83d85a/attachment.sh>
More information about the xubuntu-users
mailing list