Create filename with conditional parts

Did you know that you can filter for files where a particular field is missing with e.g.
%mediatype% MISSING

Did you know that you can prepare the format string for the filename that the string part for MEDIATYPE is only used if there is data in MEDIATYPE?

Did you know that you can ease your work with a $if() function to fill any missing data with a dummy string?

1 Like

In a word NO I did not, thats all started to feel a bit deep lol, and in all honesty I didn't understand went straight over my head, I just figure stick with what I understand and if its empty input it manually. Cos your defiantely gonna be thinking wtf is she trying to do lmao

if your prepared to write out an idiot proof how to with exactly what to write and where to put it, for an oap in training with many wtf moments in her life then please do :smiley:

What do you want to do first?
You find the filter input box at the bottom of the window.
Load all the files.
Enter in the filter box:
%mediatype% MISSING
Now the list of files should only show those files where there is no data in MEDIATYPE.
You may now enter something in your field.
If it is the same for all files, you have now saved a lot of time, I would say.
Press Ctrl-S to save the changes in the tag panel.

1 Like

Ok I got that one, I written it down :smiley:

I don't know if you will find something for MEDIATYPE for all files ...
So, if you do not want to get something like
"Europe - The Final Countdown - 1986 - ()"
Then I would suggest that you modify

the square brackets work like an if-condition


OH excellent, so I understand

if I write that in as it is, with the square brackets that would be instead of the one without square brackets, but would cover the case if no info in the required field

The square breackets would not appear in the output.

1 Like

ok, thank you.

I do have a couple more things you might be able to help with.

I have a few tracks that say something like

When You Believe (Theme From Prince Of Egypt) how can I change it so that it shows up as
When You Believe [prince of egypt] so basically making it all lowercase within the brackets but also making it go from rounded to square brackets

Doesn't matter I figured it out :smiley: :stuck_out_tongue_winking_eye:

Actually I have not only half of it :neutral_face: thats what you get for blowing your own trumpet :smiley:

I've managed to make it look like

When You Believe [theme from prince of egypt] how do I make it remove the words "theme from"

Replace "theme from" with nothing:

thank you :smiley:

I have successfully removed "theme from"

I blew my trumpet to quick, I thought I figured it out but I hadn't

I thought I had succeeded in lower case between brackets but I had not, it was lower case the entire filename, so I undid what I done

how do I make it look like this

the field is title

When You Believe [prince of egypt]


Format string:
$regexp(%TITLE%,(.*) \((.*)\),$1 '['\L$2']')

Search everything before a space and round opening bracket and put into capture group $1
Search everything between and including the round opening bracket until and including the round closing bracket and put it into capture group $2

Replace it with the content of $1, followed by a space and opening square bracket, the content of $2 in lowercase and the closing square bracket.

I recommend to replace the string "theme from" in a second step and separate action for an easier understanding. :wink:

1 Like

Your an absolute legend, thank you, and I will do what you suggested for the "theme from" bit etc :smiley:


Please be aware that regular expressions only works for the given examples.
If your real title have more then one couple of round brackets or they only have an opening but no closing bracket, then this format string doesn't deliver the expected result.

Always check your data carefully before and after applying such a regular expression :innocent: to ensure you get the expected result.

1 Like

Will do, and thank you again, hopefully I won't bother you all again lol, famous last words :smiley: