# Lyrics and Album from File

**URL:** https://community.mp3tag.de/t/lyrics-and-album-from-file/10981
**Category:** Support
**Created:** [October 21, 2010, 2:30am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981 "2010-10-21T02:30:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jhonperkins](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@jhonperkins](https://community.mp3tag.de/u/jhonperkins)
#### Post date: [October 21, 2010, 2:30am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/1 "2010-10-21T02:30:02Z")

</div>

Hello all.

I was wondering, is there any possibility to automatically add for instance, an image (album art) to a certain field I define (since I still have to investigate iTunes' tag for album art and lyrics) in a bunch of mp3s?

My music collection is homogeneously organized, which means I can deterministically figure out the album name and so on from files and folders... and I could have let's say, a "folder.jpg" inside each album folder, which would be the image pasted into the metadata. Or maybe that folder.jpg could also have a filename schema after the album's name. Either way is fine.

Also I'd like to do the same for lyrics (which I still have to find out a program that can automatically download lyrics in batch mode!!), in which case I'd have a separate .lrc or .txt file for each mp3.

Can this be done somehow in mp3tag, by means of actions or making my own scripts or something? 🙂

Thanks for your time!!! ![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:")

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [October 21, 2010, 6:43am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/2 "2010-10-21T06:43:03Z")

</div>

If you have the lyrics and covers as local files, you can use the actions  
**Import cover from file** and **Import text file**  
to import them to all files in one go.

---

<div class="post-metadata">

### Author: ![jhonperkins](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@jhonperkins](https://community.mp3tag.de/u/jhonperkins)
#### Post date: [October 22, 2010, 4:05am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/3 "2010-10-22T04:05:10Z")

</div>

Man, I feel so stupid. Long time forum'er and making such dumb questions with the answer right straight on the actions list.. missed that couple.

But thanks a lot man, loving mp3tag a lot more now!!!!!! 😃

The cover import is a bit tricky because it seems as it wouldn't recognize name schemes (e.g mine is **_$replace(%artist%,/,-,:,-,,-,?,-,,-,\<,-,\>,-,|,-) - %year% - $replace(%album%,/,-,:,-,,-,?,-,,-,\<,-,\>,-,|,-).jpg_**) but it totally does!!!!!!!!!!!!!!  
PD: You could also use an absolute path to the covers like  
**_H:\TEST\covers$replace(%artist%,/,-,:,-,,-,?,-,,-,\<,-,\>,-,|,-) - %year% - $replace(%album%,/,-,:,-,,-,?,-,,-,\<,-,\>,-,|,-).jpg_**

Man, the scripting implementation in mp3tag is absolutely rocking fantastic!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Same thing goes for importing lyrics (in this case, since i need it for iTunes, which uses UNSYNCEDLYRICS field, I added two actions, one searching for .lrc and the other for .txt; provided I don't care the error message that it couldn't find the file, as it will either find the .lrc and not .txt, .txt and not .lrc or none at all for instrumental songs... it's all good!)

In case anyone cares in the future, I added as an attachment the action I created for this purpose, you can even edit it in notepad to suit your taste.

![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:")

[Import\_from\_files.mta](https://community.mp3tag.de/uploads/default/original/2X/4/40f47e2012924e7e44591204be605212fe8f9c09.mta) (645 Bytes)

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 22, 2010, 7:28am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/4 "2010-10-22T07:28:54Z")

</div>

> [@jhonperkins](#):
>
> ... loving mp3tag a lot more now!!!!!! ... Same thing goes for importing lyrics (in this case, since i need it for iTunes, which uses UNSYNCEDLYRICS field, I added two actions, one searching for .lrc and the other for .txt; provided I don't care the error message that it couldn't find the file, as it will either find the .lrc and not .txt, .txt and not .lrc or none at all for instrumental songs... it's all good!) ...

Here is a small enhancement to avoid possible error message and to avoid lost of lyrics data.

Begin Actionsgroup **Test 2010#20101022.Import\_from\_files**

Action #1  
_Actiontype 12:_ **Import cover image from file**  
_Formatstring for image filename:_ **H:\TEST\covers$replace(%artist%,/,-,:,-,_,-,?,-,,-,\<,-,\>,-,|,-)÷-÷%year%÷-÷$replace(%album%,/,-,:,-,_,-,?,-,,-,\<,-,\>,-,|,-).jpg**

[X] Delete existing cover image

Action #2  
_Actiontype 14:_ **Import text file**  
_Field:_ **USLT\_TXT**  
_Filename:_ **H:\TEST\lyrics$replace(%artist%,/,-,:,-,_,-,?,-,,-,\<,-,\>,-,|,-)÷-÷%year%÷-÷$replace(%album%,/,-,:,-,_,-,?,-,,-,\<,-,\>,-,|,-)÷-÷$num(%track%,2)÷-÷$replace(%title%,/,-,:,-,\*,-,?,-,,-,\<,-,\>,-,|,-).txt**

Action #3  
_Actiontype 14:_ **Import text file**  
_Field:_ **USLT\_LRC**  
_Filename:_ **H:\TEST\lyrics$replace(%artist%,/,-,:,-,_,-,?,-,,-,\<,-,\>,-,|,-)÷-÷%year%÷-÷$replace(%album%,/,-,:,-,_,-,?,-,,-,\<,-,\>,-,|,-)÷-÷$num(%track%,2)÷-÷$replace(%title%,/,-,:,-,\*,-,?,-,,-,\<,-,\>,-,|,-).lrc**

Action #4  
_Actiontype 5:_ **Format tag field**  
_Field:_ **UNSYNCEDLYRICS**  
_Formatstring:_ **$trim(%USLT\_TXT%$char(13)$char(10)$char(13)$char(10)%USLT\_LRC%,$char(13)$char(10))**

Action #5  
_Actiontype 9:_ **Remove fields**  
_Fields to remove (semicolon separated):_ **USLT\_TXT;USLT\_LRC**

_Note: Replace each special ÷ character with one space character._  
End Actionsgroup **Test 2010#20101022.Import\_from\_files** (5 Actions)

[Test\_2010\_20101022.Import\_from\_files.mta](https://community.mp3tag.de/uploads/default/original/2X/7/7c258cf997172fb47c42e49dda26fb6f0f3714d7.mta) (784 Bytes)

DD.20101022.1128.CEST

[Test\_2010\_20101022.Import\_from\_files.mta](https://community.mp3tag.de/uploads/default/original/2X/7/7c258cf997172fb47c42e49dda26fb6f0f3714d7.mta) (784 Bytes)

---

<div class="post-metadata">

### Author: ![jhonperkins](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@jhonperkins](https://community.mp3tag.de/u/jhonperkins)
#### Post date: [October 25, 2010, 12:53am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/5 "2010-10-25T00:53:54Z")

</div>

Thanks a lot once again DetlevD.

Would you care to explain more on what your improved actions do?

I understand, it created two extra tags that get eliminated later on (but don't understand why would it NOT show an error message if .txt or .lrc are not found).  
Also I quite did not get the char(\*) part of the last action, is it meant to remove enters and other special characters?

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 25, 2010, 2:01am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/6 "2010-10-25T02:01:54Z")

</div>

> [@jhonperkins](#):
>
> Thanks a lot once again DetlevD. Would you care to explain more on what your improved actions do? ... I understand, it created two extra tags that get eliminated later on (but don't understand why would it NOT show an error message if .txt or .lrc are not found). ...

At first you spoke about "error message".

> [@](#):
>
> povided I don't care the error message that it couldn't find the file, as it will either find the .lrc and not .txt, .txt and not .lrc or none at all for instrumental songs...

I did not see any error message in Mp3tag when trying to load a textfile which does not exist.  
Maybe my Mp3tag is set to suppress such error messages, so I wrote about "possible error message".  
So if you really got an "error message" from Mp3tag on loading a text file which cannot be find, and it hinders you to work on, then take a look into the settings dialog to find an option which is able to suppress this error information. But I do not know for sure if there is one option. You wrote about an upcoming error message. Some error messages or info dialogs can be suppressed as far as I know.

My small enhancement proposal is designed for the possible existence of both filetypes ".lrc" and ".txt". In the possibly erroneous case when two files exist of both filetypes, then both content will be added into the UNSYNCEDLYRICS tag-field, separated by two linefeeds.  
In the case when only one file exist, having one type of both filetypes, then only this one file content will be written into the UNSYNCEDLYRICS tag-field.  
Because of the design of the concatenation script in Action#4, it is needed to eliminate superfluous linefeed and surrounding space characters, which is done by the $trim function, when only one or none file is found.

DD.20101025.0602.CEST

---

<div class="post-metadata">

### Author: ![jhonperkins](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@jhonperkins](https://community.mp3tag.de/u/jhonperkins)
#### Post date: [October 25, 2010, 2:34am UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/7 "2010-10-25T02:34:12Z")

</div>

Ok!! Gotcha 100%.

Thanks a lot DetlevD. Will look into the options then, to check if it's possible to suppress this error message.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:22pm UTC](https://community.mp3tag.de/t/lyrics-and-album-from-file/10981/8 "2026-02-09T12:22:37Z")

</div>


