This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Auto rename music files

Tags: None
(comma "," separated)
rainbowgoblin
Registered Member
Posts
21
Karma
0

Auto rename music files

Thu Apr 17, 2014 5:32 am
K3b has a great feature that lets you rename mp3 files when you make a data CD. This is really useful if, say, you want to make an mp3 CD to play in a car stereo that ignores directory structure, and might normally do things like play all the songs that start with "01" first. From the documentation:

Let K3b rename all the mp3/ogg files you add to your project to a common format like "artist - title.mp3"


OK, a "common format like 'artist - title.mp3'". Does this mean other common formats, like, say, "artist - track number - title.mp3" might be supported, too? Because the feature isn't all that well documented, and I can't figure out the formatting strings required ("artist - title.mp3" requires "%a - %t.mp3"). I tried "%T", "%n", "%d", "%y", "%Y" (I thought this would almost certainly be year). Every format I come up with other than "%a" and "%t" is just interpreted literally.

Are artist and title the only things that are supported? I'd really like to be able to listen to whole albums in my car in order.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Auto rename music files  Topic is solved

Thu Apr 17, 2014 11:06 am
I've taken a look at the source code - it appears to rely on "What's This?" functionality to display the documentation. This can be triggered from the question mark in the window decoration.

I've posted the documentation below in any case.
Code: Select all
Pattern special strings:
The following strings will be replaced with their respective meaning in every track name.
Hint: %A differs from %a only on soundtracks or compilations.

%a or %{a} or %{artist} - artist of the track
%t or %{t} or %{title} - title of the track
%n or %{n} or %{number} - track number
%y or %{y} or %{year} - year of the CD
%c or %{c} or %{comment} - extended track information
%g or %{g} or %{genre} - genre of the CD
%A or %{A} or %{albumartist} - album artist
%T or %{T} or %{albumtitle} - album title
%C or %{C} or %{albumcomment} - extended CD information
%{d} or %{date} - current date
%{e} or %{ext} - file extension (if left out, it is added automatically)


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
rainbowgoblin
Registered Member
Posts
21
Karma
0

Re: Auto rename music files

Thu Apr 17, 2014 11:15 pm
Thanks for the "what's this" tip. It also says:

Code: Select all
This specifies how the files should be renamed. Currently only the special strings %a (Artist), %n (Track number), and %t (Title) are supported.


Not sure how I missed %n, I was sure I'd checked that. I can confirm that the version I have running (2.0.2-9) does indeed support this feature (the long versions, i.e., %{artist} don't work, nor do the other formatting strings).

Thanks again!


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]