Automatically add Cover Art based on Directory/Folder name

HI, i would like to know if there is any way to create an action to automatically add cover arts in .mp3 files based on Directory/Folder name

For example i was thinking to create a folder with all the cover arts i want and name all the covers based on the music folders i want to add them to.

E:\Covers and in there there is a jpg named MUSICCITY.jpg

Now i want to automatically add that image to every file using mp3tag if the Directory contains MUSICCITY

E:\New music\MUSICCITY (November 2019)

So actualy something like

*IF Path contains E:\New music\MUSICCITY Replace/Add all cover arts with MUSICCITY.jpg from E:\Covers

Is there any way to do that?

From your example I do not see that the cover picutre files actually have the name of the folder of the music files.


There is something extra in the folder name which means that folder name and cover file name do not match.

Now you have to tell us which part of the folder name has to be left out or whether you want to rename the cover files so that folder and file names match.

The general background:
There is an action
to import covers.
So if the cover file name and the folder name would match 100% you could use for the cover file name the
Format string: e:\covers\%_directory%.jpg
It will become very tricky if you want MP3tag to guess which is the correct filename.

Firstly thanks @ohrenkino for the fast reply.

This was just an example, usually my folders have the structure below

Crate Diggerz 0511
Crate Diggerz 0611

Actualy the numbers represent the date, 5th of November for example, so can they be left out of the String?

So Actually

IF Path contains E:\New music\MUSICCITY Replace/Add MUSICCITY.jpg from E:\Covers
IF Path contains E:\New music\Crate Diggerz Replace/Add Crate Diggerz.jpg from E:\Covers

You could try the following
Format string: e:\covers\$regexp(%_directory%,'(.*?) \d+$',$1).jpg

1 Like

Once again you did the trick, i've done some tests and it seems to be working correctly. :+1:::clap::raised_hands:

Thank you @ohrenkino

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.