Filename to Tags - How Does it Work?

An example filename:
01 15. Stop Forwarding That Crap To Me[5∶26][192 44100KHz CBR 2ch].mp3
All I want to get from that is the first digit to be $discnumber%

… and I’ll be darned if I can get -ANYTHING- from Filename to Tags at all.

I put in %discnumber% %tracknumber% and the preview shows nothing.

If I select one of the preset things I get data, but if I make any changes, enter my own thing, I get nothing.

It’s pattern gets converted to a regular expression matching over the entire filename with special handling for the file extension. It’s not just a partial match. And discnumber and tracknumber are considered numerical, hence it does not fully match you string. The pattern %discnumber% %tracknumber% becomes a regex basically similar to ^\d+ \d+\.\w+$, and the filename does not match here.

You need some variable to catch the " . Stop Forwarding That Crap To Me[5∶26][192 44100KHz CBR 2ch]" part of the name. E.g. the following should work:

%discnumber% %tracknumber%. %rest%

We should probably improve this to start matching the prefix but allow additional content in the filename that does not get matched.


Ah, so basically the way it is now, you’ve got to account for all the data somehow in the strings.

1 Like