Extract text before ',' in file naming script?

P

pastic

Guest
I have a simple file naming script:
$if2(%composer%,%artist%) - %album%/$num(%tracknumber%,2)_%title%

However, this gives me the entire composer value as in ‘Bach, Johann Sebastian’. I would like to just get the last name, i.e. everything before the ‘,’.

I have tried asking ChatGTP but it just gives me code that does not work.

How can I augment the $if2 function to only return the composer lastname if composer tag is present?

3 posts - 2 participants

Read full topic

Continue reading...
 
Top