Take Part of Filename and Copy it to a Field

I've run into a lot of files where a lot of information is crammed into the file name. For example, I haave a whole bunch of files with the name in the same format:

1928 HITS ARCHIVE_ Coquette - Guy Lombardo (Carmen Lombardo, vocal)

So I'd like to move the 1928 to Year, everything between _ and - to Title, etc. I'd also like to rename the file to simply the title name, Coquette. What's a good way to approach that, or at least a reference in the documentation?


The relevant documentation is Import Tags from File and Folder Names – Mp3tag Documentation.

Basically, Convert → Filename - Tag needs a format string, which is a way to identify the parts you want to import to the tag. Actual characters and strings from the existing filename are used as anchors to describe boundaries for the %field% parts, which describe the flexible parts you want to import.

In your example a working format string would be

%year% %dummy%_ %title% - %artist%

Note, that the blanks, the underscore, and the dash characters are used as anchors. %dummy% is used to ignore the referenced part, so

%year% %dummy%_ %title% - %artist% (%dummy%)

would also omit the part in the parentheses.

Once you have the metadata imported, you can just use Convert → Tag - Filename with %title% to rename the files.

OK I'm starting to understand this. I have it so Guy Lombardo goes to artist, but if I want the stuff in parenthesis to go to artist, I thought it would be:

%year% %dummy%_ %title% - %albumartist% (%artist%)

But that doesn't work. Neither does

%year% %dummy%_ %title% - %albumartist% %dummy%(

should work for

Could it be that the hyphen is not really a hyphen but something else?

@Andacar If you want to quick test your filename for special (unicode) characters, you can copy & paste it in the Input text box here and press "Identify":
Then you can check in the result box, if one of the text characters is not the one you used in the format string.
For example if your hyphen is not the usual
U+002D : HYPHEN-MINUS {hyphen, dash; minus sign}
or your space is not the usual
U+0020 : SPACE
or your underscore ist not the usual
Sometimes even "normal" characters looks like A to Z but are Unicode characters like the Russian (Cyrillic) letters А or В

1 Like