Extract part of filename

Hi, hope you all have a good year end period!

I previously had a good response from ohrenkino on extracting from filename when my files were simply %artist% - %title% ($eql(%title%,$regexp(%_filename%,'.*

  • (.*)',$1)) but meanwhile my filenames look like this:

%albumartist% - %genre% - %album% - %track% - %artist% - %title%

I did find a way to tag artist and title using the %dummy% function ... my request is to extract, individually, artist and title from the filename so i can compare with the actual tags.

Many thanks to whoever can help,

Willem VAN ECK

It looks to me as though you have 4 pieces of data that you want to ignore - use %dummy% for that and 2 that you want to check.
So if the orginal filename has the structure ...
%albumartist% - %genre% - %album% - %track% - %artist% - %title%
you can use
%dummy% - %dummy% - %dummy% - %dummy% - %artist% - %title%

BUT: it could very well be that the filename is not like the contents of the tag fields as the tag fields could contain characters that are illegal for filenames. So MP3tag simply leaves them out.
If you want to compare the filename and tag fields, then you can use a filter
"$if($eql(%_filename%,%albumartist% - %genre% - %album% - %track% - %artist% - %title%),1,0)" IS 0

You can also import data from the filename into user-defined fields like
%dummy% - %dummy% - %dummy% - %dummy% - %my_artist% - %my_title%
and then compare %artist% with %my_artist% and/or %title% with %my_title%

Many thanks and much appreciated !

Nice and happy new year to all.

Willem VAN ECK