How To Insert A Phrase "X" Spaces From The End Of The Album Name


#1

Hello, and thanks in advance for any help. I've been using Actions for a while (thanks again to all for any earlier assistance :slight_smile: ) but just ran into a problem for which I can't find a solution, although I'm sure it's not so difficult. I title my albums "%album%{%year%}" but sometimes eventually edit the album, so I'm trying to create an Action to add the phrase "[Edit]" seven spaces from the end of the album title, between the last character of the album title and the first brace containing the year. I've successfully made an Action with the field "ALBUM" and the string value "%album%'['Edit']'", but I can't figure out how to place the "[Edit]" seven (7) digits from the end of the album title. Any help is greatly appreciated; thanks again for your time.

Edit: apologies for my initial post. I fat-fingered the Enter key accidently :wink: .

Edit 2: "{" is a brace, not a parenthesis or a bracket :flushed: .


#2

An example would really be helpful.
How to append a field with something else has been described exhaustively in the FAQs.
/t/967/1
If this does not fit it: what do you want?


#3

Action: Format value
Field: ALBUM
Formatstring: $left(%ALBUM%,$sub($len(%ALBUM%),6))'[Edit]'$right(%ALBUM%,7)
From:
The Album {2012}
To:
The Album [Edit] {2012}

DD.20120514.1336.CEST


#4

Thank you very much for your reply, DetlevD. I think that I wasn't clear in my original post. I want to create an Action to change

From:
The Album{2012}
To:
The Album[Edit]{2012}

When I tried your above Formatstring the result was

From:
The Album{2012}
To:
The Album[Edit]m{2012}

I edited your suggested Formatstring to "$left(%ALBUM%,$sub($len(%ALBUM%),6))'[Edit]'$right(%ALBUM%,6)" (changing the "7" to a "6") and is seems to work--dumb luck, that--but I wanted to check with you that this will always be correct because, to my eyes, your Formatstring is an alien language :laughing: . Thanks again.


#5

As you have seen within my proposal, I have erroneously placed an additional space character.
You have noticed this, and with a little adjustment by you, the proposal works for your situation now.

The "alien language" is a simple expression of the Mp3tag Scripting Language.
Try to understand how the Mp3tag scripting language works and how it can help you to solve your special desires, beyond the obvious tool set of converters and actions.

DD.20120514.1823.CEST


#6

You can also use $cutright(%album%,6)'[Edit]'$right(%ALBUM%,6)


#7

DetlevD: thanks for the confirmation.

dano: thanks for your input. The Formatstring you offered also works.

I really appreciate both of your help, thanks again.