Import my cover front, regardless of the extension of the file in my code

Hello, I would like to import my front cover under this code if, regardless of the extension of the file in my code:

%artist% ~ %album% (Front ~ Cover)

Instead of writing each time for each differente extention

%artist% ~ %album% (Front ~ Cover).jpg
%artist% ~ %album% (Front ~ Cover).png

Thank you.

Have you tried
%artist% ~ %album% (Front ~ Cover).* ?

I am not sure if it is necessary to point at a supported picture type file ...

Ok, it works well. Thank you. I wanted to remove all invalid cractères with code but it is not working. I try it with the name of my files, but not with the covers:

For my filenames:

$validate($num(%track%,2) ~ %title% ~ %artist%$if($eql(%artist%,%albumartist%),,$regexp(%albumartist%,^(.+)$, ~ $1))$regexp(%album%,^(.+)$, ~ $1) ~ %year% ~ %genre%,)

For my covers:

$validate(%artist%[ ~ %album%] (Front ~ Cover).*,)

Why does not it work?

I think because you included the * - as this is no valid character for a filename, you end up without the wildcard.
$validate(%artist%[ ~ %album%] (Front ~ Cover),).*

If you want to open an image file, then you should know the actual name of the file exactly ...
or give Mp3tag the chance to find a possible file by using wildcard matching for the file name.

If you are guessing an existing filename in advance, then you always have two chances, either it works or it does not.
Note: An existing file has already a validated file name!

The function $validate is good for creating a valid file name.
The function $validate is not suited to guess the name of a file, which already exists.

Instead of ... $validate(%ARTIST%[' ~ '%ALBUM%]' (Front ~ Cover).*',)

(Note: $validate removes the invalid character '*', ...
therefore the new filename will be unusable, because filename extension fails.)

try this ... %ARTIST%'*(Front ~ Cover).*'

The quoted formatstring has code, which is superfluous.

This formatstring should give the same result ...

$validate($num(%TRACK%,2)' ~ '%TITLE%' ~ '%ARTIST%$if($eql(%ARTIST%,%ALBUMARTIST%),,' ~ '%ALBUMARTIST%' ~ '%ALBUM%)' ~ '%YEAR%' ~ '%GENRE%,)


Thank you. I understand better and better the functioning of the programe.