Remove parenthetical "feat." from filename

How about adapting this to prevent it being applied when the filename / title contains '(feat. )' regardless of the number of characters within parenthesis?

How would this be done?

I would use a filter
%title% HAS "(" AND NOT %title% HAS "(feat."

Thank you for your reply.

Is there not a way to do this within an action? Something like:

[#0]
T=4
F=_FILENAME
1=$if2(\\(feat. \\)),( \\s*\\(.*\\)
2=
3=1

[#1]
T=4
F=TITLE
1=$if2(\\(feat. \\)),( \\s*\\(.*\\)
2=
3=1

image

Although there seems to be a problem getting this working, I am not sure exactly where I have gone wrong?

You might have noticed that the original example was to be used as part of a regular expression.
If you want to use the scripting language you have to use an action of the type "Format value" with the $regexp() nested inside the $if() statement.
Feel free to experiment.
I find it much simpler to use the filter.

Using the filter also has the discrete charme that only those files get processed that actually match the criteria.

1 Like

Understood.

I have been amending the code but cannot get it to work despite attempting to fix using your guidance:

Not quite sure what is wrong with this?

$if2($regexp(feat. ),( \\s*(.*)))

or perhaps I should use

$if2($neql(

although I cannot figure out how this would be implemented exactly with coding.

I also want to use something similar to stop the case of text within brackets being changed when running my all in one import rule, especially to make the action skip case change for a contributing artist like '(feat. The Four Seasons)'. To complicate this, I would want the case to be changed for anything outside of the '(feat. )' brackets. Sometimes there are also other brackets which contain information which should be affected.