Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: masstagger - problem w/ renaming files (Read 3117 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

masstagger - problem w/ renaming files

hi,

i am sorry if i did not find the right forum for this, please move this if not appropriate here.

my problem: i want to rename quite a few files with the help of the mass tagger.  so far it is working, though these tracks are a bit tricky. they have an id3v2 only and the value for tracknumber is 1/11 or 2/11 etc.  i know id3v2 is evil, but that is just the way it is.
trying to rename the file results in masstagger attempting to put a "/" into the filename, which certainly is not possible. i do not really want to rename all these 50+ files manually, but i do not have an idea. i could certainly rename that field, but obviously i would like to keep the tracklisting active & intact. i do not know how to remove only the /11 (and according to that) which would already solve the problem.

any ideas?

i hope this question is ok, i did try to find it in the rest of the forum but did not see an answer.

hope you can help me with this,

across.the.universe

masstagger - problem w/ renaming files

Reply #1
Are you saying the masstagger tried to put / into the filename anyway?

Either way, you can use $replace to substitute it -e.g. I use
Quote
$replace(%artist% - %title%,",'',*,.,?,,/,-)


Which replaces a " with two 's, a * with a dot, removes ?s, and now replaces / with - as an example here.
.

masstagger - problem w/ renaming files

Reply #2
hi

thanks a lot, that helped! it is working flawless now!

across.the.universe

masstagger - problem w/ renaming files

Reply #3
sorry, one more question.

the tracknumbers are named "1/14" or "12/14" etc.
now when i - thanks to your help - rename them everything works out fine except that the files have to be sorted by tracknumbers & i would need "01 - artist - title" as usual. this is some more difficult - if possible at all. do you have an idea how to achieve that?

aside - i already love the retagger!!! ;-)

across.the.universe

masstagger - problem w/ renaming files

Reply #4
Quote
sorry, one more question.

the tracknumbers are named "1/14" or "12/14" etc.
now when i - thanks to your help - rename them everything works out fine except that the files have to be sorted by tracknumbers & i would need "01 - artist - title" as usual. this is some more difficult - if possible at all. do you have an idea how to achieve that?

aside - i already love the retagger!!! ;-)

across.the.universe

Try
$if($strchr(%tracknumber%,/),$num($cut(%tracknumber%,$sub($strchr(%tracknumber%,/),1)),2),%tracknumber%)

if you mean you dont want the second part of the tracknumber.

It wil return 01 for 1/15.

However, if Tracknumber isnt present it will return 00, so use:

$if(%tracknumber%,$if($strchr(%tracknumber%,/),$num($cut(%tracknumber%,$sub($strchr(%tracknumber%,/),1)),2),%tracknumber%),)

or, if you have files tagged with 00 tracknumber:

$ifgreater(%tracknumber%,00,$if($strchr(%tracknumber%,/),$num($cut(%tracknumber%,$sub($strchr(%tracknumber%,/),1)),2),%tracknumber%),)

edit: Curious George: Hmm.. I guess that's simpler 

If you dont want the 00, though, you will still need checks to remove them, but if your sorting I guess you would want them.
.

masstagger - problem w/ renaming files

Reply #5
I think what you really want is just: $num(%tracknumber%,2)

That'll turn "1" into "01", turn "01/10" into "01", and leave "01" as "01".

edit: musicmusic beat me to it, but I think what he's doing is probably more complicated than you want or need.

masstagger - problem w/ renaming files

Reply #6
hi,

this is the commandline i needed: $if($strchr(%tracknumber%,/),$num($cut(%tracknumber%,$sub($strchr(%tracknumber%,/),1)),2),%tracknumber%) %artist% - %title%

thanks a lot you two are really nice & helped me out! i am impressed once again what is possible if you know how to do it *grin*  ... i will dive deeper into this syntax ... it is fun *hehe*

really, thank you - you saved me from a lot of work & manual editing.

cu later,

across.the.universe

masstagger - problem w/ renaming files

Reply #7
You can also use the masstagger feature "format value from other fields" to eliminate that from your tags. Format $num(%tracknumber%,1) into tracknumber.