Import cover art in batch mode from folder with not identical file-names (suggestion)



Some time ago I use to edit the tags mp3Tag both video and audio. I would like to have a function that would allow me to import video covers (jpg previews) in a directory and in batch mode but in a very concrete way.

The name of the jpg files are identical to the names of the video files but only partially. Therefore, I would like to import jpg files as a cover in the videos but without renaming the photos.

Currently, to import mass covers, I use this function to import:

function: "Import cover from file"
format string for image filename: "E: \ Video \ The KMPlayer \ Capture \% _filename%. jpg"

I do it this because the file names are:


however, I had to edit the name of the photos to get here. When I capture I get a name like this:


so I would like to ignore the last 9 digits of the filename. Dano told me that one function of this type is not possible to create with the current mp3Tag.

If I could add something like that would be of great help for me!

Thanks and greetings!


You can use the Mp3tag Scripting Language within the edit field of the action "Import cover from file".
If you are out of luck with the Mp3tag toolbox, then use a file manager application to prepare the cover filename for the work with Mp3tag.



Hi! I use filename app for rename files but I would like do it with mp3tag in the future if it is possible... So, how it works at the issue of scripts?

I need create one script for this operation?? I only need, for example, erase 9 chars of the end of file and import, is simply but i'm not programmer :stuck_out_tongue: (but I know little program with C)

it is a impossible mission? hehe

thnk you!


As far as I know it's not possible with Mp3Tag, because the import cover form file function needs a deffinitive file path to find a file. Placeholders or regular expressions are not possible.

Would be nice if a file parser would be integrated. Maybe "directory sources srcipts" which can parse the local file structure similar like "web source scripts" parse web sites.

Often I have just one .jpg file in a folder with a random name. Would be good if I could just import *.jpg which would just choose the first .jpg file in the directory.


thanks for reply,

hopefully I'll get lucky and they be encouraged to do so. I really would go very well for me because I would use this function to import videos covers; I'm working with large quantities.


I couldn't formulate it better what exactly I was trying to do.
So there is no solution for this?

The functionality to seek and display the first cover art in the directory is implemented in the product (see when "Don't display first image from the directory as cover art" is unchecked), can't that logic be added as an action also?


What would be the benefit?
If you named your files like "back.jpg" and "front.jpg" then you would get as first file "Back".
Afterwards you have to set it right but do not have the luxury to be able to filter for tracks that do not already have an image at all...

Which brings you back to first of all check the collection of album art files, name them appropriately and then import them.
If you have only one albumart file stored in each directory you can easily rename them so that they can be imported.


98% of the cases I have only one albumart file in each directory but the name is not front.jpg or folder.jpg or similar. I have some naming convention and I wouldn't like to change it.
If *.jpg as import rule would work it would make the cover art attach much more simple for my case but if it's not an option I will find an alternative solution :slight_smile:


If you used your naming convention throughout then there should be a pattern that could be used by MP3tag.
E.g. if you used the album name then you could enter in the mask for the filename for the import action


Would that be an alternative.


it would be too simple :slight_smile:

So my naming convention is the following - talking about audiobooks:
directory name: artist - book (type) where the type can be abridged/unabridged/radioplay/...
the cover filename: book.jpg

i.e. Charlotte Brontë - Jane Eyre (unabridged) and the cover file is Jane Eyre.jpg

in tags I want album to be "Jane Eyre (unabridged)"
Thus from album name it's not possible to get the cover file name without regular expressions.

Finally I found this solution:
created an action with 3 subactions:

  1. Guess values "%album%": %book%" (%type%)
  2. Import cover from file "%book%.jpg"
  3. Remove fields "book;type"


so why don't you use the regular expression?

Action: Import cover from file
Formatstring: $regexp(%album%,(.+) (.+),$1).jpg


because I was not aware that I can do it there. I had the feeling that static names or tag references can be only used there.
Now I will do so :slight_smile: