Forcing Tag Through Customize Column

My objective if simple, if the year is NULL, then I want it to put the current year i.e. 2010.

So, what I've done right now in Customize Column is this:

Name: Year
Value: $if($len(%year%)<>0,%year%,2010)
Field: %year%

But the problem is, although it will display 2010 if the year is empty, but I have to manually point to the year field manually then go somewhere else, only it will be saved.

Otherwise, the year would still remain blank.

Any comments?

Thank you.

Use "Actions" if you really want to save tags.

Format value
Field: YEAR
String: $if2(%year%,2010)

Mp3tag list view is basically a somewhat "passive output" view to the tag fields and their inner data, although it is possible to use scripting language expressions to modify tag field data for visual presentation.

What you have tried, this can work, anyway, but you have to save each track manually by pressing [Ctrl+S] or by moving the current list pointer up and down or such other navigating (related option must be set to do so).

As you have mentioned - this is one possible way to make manually changes to the content of tag fields - but there might be other ways to go in Mp3tag how to manipulate values in tag fields.

For mass editing you can use an action or a group of actions, right configured to your need - there lies the power of Mp3tag.

Taking your example from above, you can solve this task using an action "Format value" and a liitle bit of Mp3tag scripting language.

Action: "Format value"
Field: YEAR
Format string: $if2(%YEAR%,'2010')

Run this action against the selected files ... that's all.

If you need an automatically "running" fix value for each current year ...
Format string: $if2(%YEAR%,$left(%_date%,4))
Format string: $if2(%YEAR%,$left(%_datetime%,4))
This scripting expression might depend on the local computer DateTime setting.
If your computer has a DateTime setting accordingly to ISO 8601, then it should work.


Thanks a lot.

That's the original idea in fact i.e. to automatically set to the current year not hard coded to '2010'.

And yes, immediately after I ask this question, only then I realized that it could be simply included in my Actions script.

I am so sorry for that.