Trouble using "import cover from file"

I've created an action using the following steps:

  1. Click Actions
  2. Click "new" and type "Add Image."
  3. In the next window press "new" again, select "import cover from file" and press ok
  4. Enter "Folder" as format string. "delete existing cover art" is not checked.

However, when I attempt to use the action, I get the error "Import cover from file "Folder" (Front Cover): File C:\Users<my name>}\Music<file subdirectory with both mp3s and folder image file>\Folder cannot be accessed.

I can manually add an image by highlighting the tracts, and selecting "Add cover" -> Select image -> Save Tag, but I would rather be able to use an action as a short cut.

Every album is in its own directory, every directory has a cover image named "Folder" or "folder" the images are either *.jpg or *.png filetypes. I don't get the error on every album, but I get them on enough that has become a problem.

I'd love to figure out what I'm doing wrong.

Did you add an extension in the format string ?? So for example Folder.jpg ?

I have no idea if having no extension works with the Import !

Mine works with the Format String for Filename set to folder.jpg and the file (folder.jpg) exist in the directory.

You have to specify the full filename including extension.
If you have different extensions you have to use "folder.*"

Thx @Poster. I never knew that you could use wildcards. This program never ceases to amaze me :smiley:

Edit: One question though, whatif you have both Folder.jpg and Folder.png which one will the action take ?

Why don't you test it? :wink:
In my tests it took folder.jpg, maybe because of the alphabetical order.

Anyway this is not important for me, because I have only folder.jpg. I convert any other format into jpg.

Good Point :blush:

I also use .jpg (1000x1000 minimum when I can get them)

Thank you for this. I'll be making the adjustment to using wildcards.

Good Morning, friends.

I need a help.

The action "import cover from file" copies ONE cover to all MP3s ... I was thinking if is possible copy multiple covers in sequence to several MP3s, each one with a different cover.

I have different .jpg image files, named in sequence as "title1.jpg; title2.jpg" and I was wondering if it is possible to create an action for Mp3Tag to assign each cover to each .mp3 file that is in the same folder ... would look like this: "title1.jpg" is assigned to "track1.mp3", "title2.jpg" is assigned to "track2.mp3", automatically, without having to put the covers one by one.

But I could not make the %title% string work for this ... the path to the mp3 folder is "C: \ Users \ Win10 \ Desktop \ Dance Tracks " and the .jpg images are in the same folder, the first with the name "C: \ Users \ Win10 \ Desktop \ Dance Tracks \ dance1.jpg", but when I enter the string in the action, I indicate the path like this: "C:\Users\Win10\Desktop\Dance Tracks\%dance%.jpg", but it does not work.

What should "%dance%" mean? I understand that you have no tag with the name DANCE but you want to import a cover with the name of the TITLE.

As a tag like TITLE may have not allowed characters for filenames there is a possibility that the actual filename is not identic to the TITLE. So in your case it it best to use the filenames instead of the tag TITLE.

Define an action of the type: Import covers from file
Format string for image filename: %_filename%.jpg

You might want to use
"C:\Users\Win10\Desktop\Dance Tracks\dance*.jpg"
But this would also lead a single picture for all files as MP3tag then takes the first picture file that starts with "dance".

If you compose a filename from variables, then you have to choose the variables in such a way that you get a unique filename in the end, e.g. %album%%track%.jpg

%dance% is just an exemple of my wrong use of the program... is just a name of file that I used as string.

Friends, good morning. Thanks for the answers, but I think I was not very clear ... I do not know how to create a tag in MP3Tag ... if I put the covers on the songs depend on it, then I will not know how to do it.
To simplify and not cause confusion with the filenames I have, I've created a test folder with music files and covers.

From this, how would it be the step-by-step so that I automatically put each cover in its respective music file at once, without having to select one by one, as I usually do?

Just note that the names of the covers and the names of the songs are just examples ... they are not the actual names of the files I have ... I just used those names to make it easier to exemplify.

If to automatically put each cover in its respective music file is necessary to change the names of one or the other, I do not see any problems in that ... I just want to know the step by step, because I do not really know how to use the program to that. With MP3Tag I can only put the covers one by one or put a single cover for all the songs.

I can not select all the covers and make each one stay in a single music file.

Is there any way to automate this or am I wasting time trying?

As I see it:
you have audio files names
track (1).mp3
track (2).mp3

and picture files with names
cover (1).jpg
cover (2).jpg

I assume that the file
track (1).mp3
should get as embedded picture the file
cover (1).jpg

Proceed as follows:

Select the files that should get treated.
Create an action or an action (quick) of the type "Import cover from file"
Format string: $replace(%_filename%,track,cover).jpg

Click OK.

If you want to test it first, use a single file for which you have a backup file.

In case of the tagfield TRACK has been filled with numerical values starting from '1', then the formatstring for the action "Import cover from file" can be rather simple: '*('%TRACK%').jpg'


It works!!

I chose the "import cover from file" action, opened the option to select the cover file, I selected the first one and then replaced the file name with the string ... that was when it worked and all my files received their respective covers automatically.

But have a problem: this string only works if the mp3 files and the covers have the same name, as in the example I gave ...

Songs: track1.mp3, track2.mp3 .... track1000.mp3
Layers: cover1.jpg, cover2.jpg, cover3.jpg .... cover1000.jpg

With this set of song names and cover, it works ... but I have music files with different names, between each of them, and the covers do not have the same names as the mp3 files ... my music files are not something Like music1, music2, etc, nor the covers are cover1, cover2 ... and so it did not work.

But if I have different song names and different cover names, it does not work.

Does not work if so:

If the songs are: aabb.mp3, bbcc.mp3, ccdd.mp3...
And the covers are: zzyy.jpg, yyxx.jpg, xxww.jpg

Using the string "$ replace (% _ filename%, track, cover).jpg" appears a message saying that the program did not find the file "aabb.jpg" ... but there was not to be a cover called "aabb.jpg" ... this was the name of the song for which the cover zzyy.jpg should have been assigned and so on ... but it was not ...

... it assumes that either the file can only be called "track" or the cover can only be called "cover" ... it does not understand these titles as "fields", which makes it impossible for the program to make the correct assignments of Each cover to each song.

Yes, this is what your screenshot showed.
And quite honestly: how should a program GUESS that aabb.mp3 needs zzyy.jpg as cover? Where is the link?

Again: anything you define with MP3tag field variables (like %track%) in the end leads to a string constant that is used as real filename, just as though you typed it in.
If there is no such file, you get an error message.

Unless you see and provide a pattern that allows to link audio and picture file, I am afraid that I cannot help you and the remaining cover-less files have to be treated manually.

See again ... Trouble using "import cover from file"
Note: the dialog "Import cover from file" allows to define a "format string" to assemble the image filepathname.
This allows highly customization, when creating a certain relationship between the media file and the image file.

If so, then you have to find a way to create a fitting binding relation.
In any way the picture name 'zzyy.jpg' exists, you have to tell Mp3tag to attach this file 'zzyy.jpg' to the file 'aabb.mp3', ...
by applying a fitting "format string".
You are free to assemble the target filename in any way you need, from any tagfield content you want.

Try to apply a target formatstring, which fits to your needs.


The names are random. Sometimes I download and, say, 150 songs without covers ... then I use a Linux or Windows program to download 150 covers any ... or different images ... I format them for the size 280x280 px, I put a logo (Done with Gimp, for example) and left in the folder ... hence there is no synchronization between the name of the music file and the name of the image.

On Linux I use EasyTag for these functions, but only to do one-on-one, since I only used it very few times and I do not have much control of its functions.

Yes you are fine! And I can solve the problem ... with some kind of hard work for a dumb (in programming language settings) like me.

I used the TAG-TAG function to change the title of the songs, leaving as "track (1), track (2), etc."

This was the string I used: track ($num(%track%,1)) choosing to have this variable replace the title of the song without touching the file name.

Then I renamed all the covers to the name "cover", so the covers got something like "cover (1), cover (2), etc", so I finally used the "import cover of a file" with the string $replace(%title%,track,cover).jpg to import the covers.

It worked very well there.

Since I kept the names of the files intact, then it was easy to use another function to copy, in all files, their names as song titles.

As the names of the covers, as I said in my first post, were not important and I could change, use and then discard all, this did not affect the final result, that each song was correctly indexed with their tags and the covers.

So, thank you guys!

You were essential so that I could understand how the strings work and to solve this problem!