How to save images as album arts according to audio filenames

Hi everyone! First post for me :slight_smile:

After a downloading process (thanks to jdownloader) I've thousands files like so:

Queen - Love of My Life (256kbit).m4a
Queen - Love of My Life (BQ).jpg

Queen - Bicycle (128kbit).m4a
Queen - Bicycle (HQ).jpg

Gary Jules - Mad World (256kbit).m4a
Gary Jules - Mad World (BQ).jpg

...

How can we embed the images to their audio files as album arts? Files are not exactly same but alike.

Apply the action "Import cover from file".
This imports the cover art specified by the absolute or relative filename into the tag of the file.
You can use placeholders like %artist% or %album%.
You can use wildcards like ? or *.

So it should be feasable to do ... having ...
music file: Queen - Bicycle (128kbit).m4a
image file: Queen - Bicycle (HQ).jpg
... apply action ...
"Import cover from file".
Format string for image filename: $regexp(%_filename%,'(.$','')
Import cover as: Front Cover

For image filename which is not exactly the same as the music filename, you may use a format string like ...

$regexp(%_filename%,'\W','?')'.jpg' ==> "Queen???Bicycle??128kbit?.jpg"

... this replaces all characters, which are not letters or numbers or underline character, with the ? wildcard.

$regexp(%_filename%,'\W+','*')'.jpg' ==> "Queen*Bicycle*128kbit*.jpg"

... this replaces all sequences of characters, which are not letters or numbers or underline character, with the * wildcard.

$regexp($regexp(%_filename%,'\(.*\)$','*'),'\W+','*')'.jpg' ==> "Queen*Bicycle*.jpg"

... this replaces all sequences of characters, which are not letters or numbers or underline character, with the * wildcard, and replaces the trailing parenthetical expression with the * wildcard.

DD.20140503.1538.CEST

If you have the files in separate folders (e.g. one per album including the audio- and the picture files) then you can use the *.jpg mechanism that selects the first picture file from a folder to import as albumart.

That's what I need !

It works like a charm ! :smiley:

I know some regex and your examples helped me understand quickly. Great thanks DetlevD!

I am sorry, very new to this, I still don't get this. This solution is exactly what I need to do. However, I still don't have the right syntax entered in the Import Cover Art from file action. My file location is K:\album_art and the jpeg files are named "Artist - Title" my MP3 files are all "Artist - Title" as well, so they all should match up. Please help me with the exact syntax.

The filename of the audio file is only of interest if you want to use that a source for the picture filename...

I assume that you have filled the tags so that the field %artist% and %title% contain data.

So, in the import cover from file dialogue enter the following as filename:
K:\album_art\%artist% - %title%.jpg

If you really only have the filename as data source, try this as filename for the covers:
K:\album_art\%_filename%.jpg