# Feature Request: Batch Export Lyrics into Individual Files (.txt / .lrc)

**URL:** https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158
**Category:** General Discussion
**Created:** [April 28, 2022, 12:27pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158 "2022-04-28T12:27:45Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 12:27pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/1 "2022-04-28T12:27:45Z")

</div>

So, lyrics are similar to cover image files, they're either stored as seperate files (.txt / .lrc) or embedded into the Mp3 files (in the USLT frame). Batch exporting lyrics is super useful because there're many tools that facilitate editing lyrics, and those tools can't be used unless the lyrics are exported.

Currently it's possible to batch import lyrics (from .txt or .lrc files) into the USLT frame, but the reverse is not possible. When trying to batch export lyrics using the Export feature, it is unable to do so because the Export feature simply can't produce individual files for each track.

[dano wrote a program 10 years ago to workaround this problem](https://community.mp3tag.de/t/mp3tag-export-splitter/14116) , but it's no longer working on the latest version (tested on Mp3tag v3.14). I also feel like this should be a standard feature rather than requiring additional software to do so.

I think it would be a really useful feature to batch export lyrics into files (.txt or .lrc), just like how you can batch export the cover image into files (.jpg, .png, etc.).

Or alternatively, please consider making it possible for the Export feature to produce individual files for each track.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [April 28, 2022, 12:38pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/2 "2022-04-28T12:38:28Z")

</div>

Here is a suggestion how to combine an export script and distribute the resulting output to several files, in this case a playlist.  
The secret lies in the command shell batch file that sends text to names files:

> [@Playlist Interpret](https://community.mp3tag.de/t/playlist-interpret/53236/21):
>
> Wenn du nach GENRE sortieren möchtest, brauchst du wenigstens eine $loop(%genre%) Anweisung (und das zugehörige $loopend()) du könntest jetzt in einem bestehenden $loop() das angegebene Feld durch %genre% ersetzen oder noch ein $loop() hinzufügen: $filename(splitter.bat,utf-8)$loop(%genre%)$loop(%artist%)echo #EXTM3U \>\> "V:\Musik\Angie Artist\Angie Genre - %genre%.m3u8" müsste werden zu $loopend()$loopend()$loopend()$loopend()

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 12:46pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/3 "2022-04-28T12:46:01Z")

</div>

Sorry but I can't read non-English and hence can't understand what's being said here.

What exactly should I do if I want to batch export USLT lyrics into individual .lrc files (or is it even possible)?

I'm a newbie to Mp3tag, so a more detailed guide would be greatly appreciated (the lyrics will contain Unicode characters (if that makes any difference), and it'd be best if the "eng||" language code can be removed when exporting)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [April 28, 2022, 12:51pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/4 "2022-04-28T12:51:25Z")

</div>

> [@tagger](#):
>
> Sorry but I can't read non-English and hence can't understand what's being said here.

OK, so perhaps this thread is better for you:

> [@How to split a playlist](https://community.mp3tag.de/t/how-to-split-a-playlist/42305):
>
> How can I simply split a playlist into "n" sub-playlists? In other words: is there a way to split a playlist of 1000 songs into 100 playlists of 10 songs, grouping the first 10 songs, the second 10 songs, the third 10 songs and so on. The only way seems to create 100 playlists by selecting 10 songs at a time, Any ideas? Thank you

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 2:08pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/5 "2022-04-28T14:08:09Z")

</div>

I looked at that thread, it is used to "split a playlist of 1000 songs into 100 playlists of 10 songs", which is fundamentally different from splitting a combined lyrics text file (.txt/.lrc) into their respective individual directories and filenames for each original track:

In the exported big combined lyrics file, the lyrics for each song isn't really divided, it also doesn't contain the directory or the file name of each track, so how do you split and send the individual lyrics into their respective directories and name their respective filenames of the original tracks? (that sounds way too complicated, I guess that's why dano wrote that separate program which unfortunately no longer works)

I think my feature request still makes more sense in this case:

> I think it would be a really useful feature to batch export lyrics into files (.txt or .lrc), just like how you can batch export the cover image into files (.jpg, .png, etc.).  
> Or alternatively, please consider making it possible for the Export feature to produce individual files for each track.

Unless anyone could offer a solution that works.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [April 28, 2022, 2:19pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/6 "2022-04-28T14:19:30Z")

</div>

I still think that the function can already be emulated, even without the detour of a batch file.  
So: rename the files so that each file gets an individual folder e.g. with Converter\>Tag-Filename  
Format string: `$num(%track%,2)\%_filename%`

Now start the export `lrc` as suggested in

> [@Embed LRC in FLAC](https://community.mp3tag.de/t/embed-lrc-in-flac/53579):
>
> so I read this but I'm still not sure so before I do this for a lot of files, I would love some clarification. I add a tag field called LYRICS. then add the content of the LRC file to it, resp. have mp3tag import the lrc file into it? the LRC files are from an officially licensed source and paid for. but they look like this: [00:09.53]Used to heatin' up in the shower, out of her arms [00:13.08]Now you're always in a rush [00:14.28]I could be paranoid but I swear, it's up in the air the …

with the option "1 file per folder"  
This should generate an exported lrc-file together with the audio file.  
Now rename the \_DIRECTORY again so that the track number level is no more part of the path - this joins all the files together in the original folder again, including the lrc-files.  
Which is more or less what you were looking for, I think.

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 2:51pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/7 "2022-04-28T14:51:35Z")

</div>

> So: rename the files so that each file gets an individual folder e.g. with Converter\>Tag-Filename  
> Format string: `$num(%track%,2)\%_filename%`

That didn't work unfortunately, it puts all my files into a folder called "00". (How do I do that with Convert\>Filename-Filename? (because metadata may contain special characters that are not permitted for filename))

I also tried the "One file per directory" option (after manually creating individual folder for each track), but it created .lrc files all in the root directory instead of the directory where the track belongs to.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [April 28, 2022, 2:57pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/8 "2022-04-28T14:57:06Z")

</div>

> [@tagger](#):
>
> That didn't work unfortunately, it puts all my files into a folder called "00

You need decent data in TRACK - honestly, you can use any field that creates a unique path to a single audio file. E.g. `%_counter%` may be an alternative for %track%.

> [@tagger](#):
>
> created .lrc files all in the root directory instead of the directory where the track belongs to.

Then use an absolute path like  
`d:\mymusic\%albumartist%\%album%\%_counter%\%_filename%`  
(which would have to be adapted to your environment)

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [April 28, 2022, 3:15pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/9 "2022-04-28T15:15:32Z")

</div>

> [@tagger](#):
>
> because the Export feature simply can't produce individual files for each track.

But the Tools feature can. Like this:

![write to file](https://community.mp3tag.de/uploads/default/original/2X/3/3f105bab6a50d7c6c7c3d4eba2e14fef01e1a9c5.jpeg)

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 3:21pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/10 "2022-04-28T15:21:28Z")

</div>

> you can use any field that creates a unique path to a single audio file

That's why I wanted to name the individual folders using the filenames of the individual tracks. (that way, the value is guaranteed to be non-empty, unique (in that folder), and permitted for directory/filename) But I don't know how.

> Then use an absolute path like  
> d:\mymusic%albumartist%%album%%\_counter%%\_filename%  
> (which would have to be adapted to your environment)

That would require every one of my thousands tracks to follow a fixed and strict routing standard (with no exception and no flexibility. also some artists/albums names contain special characters that are invalid in directories, so the directories can't match), so it is not very realistic and certainly doesn't work for most people like me. Is it still possible to export to the tracks' original directory when using "One file per directory" (like when you batch export the cover image file)?.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [April 28, 2022, 3:31pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/11 "2022-04-28T15:31:10Z")

</div>

We could discuss now every objection on your side, which, IMHO come from the lack of knowledge of MP3tag functions.  
But I doubt that this will be of much use at the moment.

I see some kind of reluctance to accept that there are already ways to achieve the goal.  
So, I think in the meantime, until the feature (for which there are already workarounds) is implemented, you are either stuck with the necessity to treat every file individually (which works already now) or wait for the implementation or become acquainted with more variables and functions in MP3tag.  
Until there is some progress, I am out.

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 3:39pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/12 "2022-04-28T15:39:43Z")

</div>

> But the Tools feature can. Like this:

Thanks, so I just tried out the Tools feature, my settings are following:

Name:  
Export to LRC  
Path:  
C:\Windows\System32\cmd.exe  
Parameter:  
/c echo %UNSYNCEDLYRICS% \> "%\_folderpath%%\_filename%.lrc"

After setting this up, I hit Ctril+1, saw multiple cmd windows flash briefly, but the .lrc is not with the track.

Am I missing something?

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [April 28, 2022, 5:35pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/13 "2022-04-28T17:35:55Z")

</div>

> [@tagger](#):
>
> Am I missing something?

No, but I am. 😞  
I believe the tool will work with many other fields, but there seems to be something special about %UNSYNCEDLYRICS%.  
I suspect it has something to do with the language prefix that Mp3tag adds when saving that field.  
With an English installation, "eng||" is added as a prefix whenever I save UNSYNCEDLYRICS.  
At least, that is what is displayed.

The pipe (|) is a special character on the Windows command line and must be replaced or escaped.  
I tried both methods without success.

And/or invisible formatting, like line feeds and carriage returns used in multi-line data, may cause problems.

Bottom line: I jumped to conclusions without testing for %UNSYNCEDLYRICS%.  
The tool might be modified to work with %UNSYNCEDLYRICS%, but it will take a bigger brain than mine. 🙂

Sorry about that, chief!

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 5:49pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/14 "2022-04-28T17:49:16Z")

</div>

I see, is it possible to use some third-party command-line tool besides C:\Windows\System32\cmd.exe , and hopefully some comand-line tools out there can export the %UNSYNCEDLYRICS% frame.

Is this a viable approach?

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [April 28, 2022, 6:16pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/15 "2022-04-28T18:16:09Z")

</div>

First, try replacing the parameter in the tool with this:  
`/c echo $replace(%unsyncedlyrics%,|,^|) > "%_folderpath%%_filename%.lrc"`  
(I may have jumped the gun again. This will escape the pipe symbol.)

I do not use lyrics in my tags, so I'm unfamiliar with how they are written and how line breaks are implemented.

This new parameter works for a one line value but I don't know how to write lyrics on 1 line and include line breaks.

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [April 28, 2022, 8:41pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/16 "2022-04-28T20:41:09Z")

</div>

> [@tagger](#):
>
> I see, is it possible to use some third-party command-line tool besides C:\Windows\System32\cmd.exe , and hopefully some comand-line tools out there can export the %UNSYNCEDLYRICS% frame

Maybe, but Mp3tag can use cmd.exe to do it.  
@ohrenkino has taught me how.

Here is a possible workflow:

1. use Tool to create TXT or LRC lyrics file  
Path: `C:\Windows\System32\cmd.exe`  
Parameter: `/U /c echo $regexp($regexp(%unsyncedlyrics%,^\w+\|\|,),\r\n,##) > "%_folderpath%%_filename%.lrc"`

2. edit lyrics file (I use Notepad++)  
-replace ## with \r\n to create separate lines  
-edit as desired  
-replace \r\n with ## to merge separate lines into 1 line

3. use "Text File - Tag" converter to import edited lyrics into UNSYNCEDLYRICS (%unsyncedlyrics%)

4. use "Format value" action to re-instate line breaks  
Action: Format value  
Field: UNSYNCEDLYRICS  
Format string: `$regexp(%unsyncedlyrics%,##,\r\n)`

**EDIT:** modified Tool parameter by adding Unicode switch (`/U`) and by using `$regexp` instead of `$replace` to replace language prefix.

**EDIT:** the Unicode switch is not sufficient. see post further down for a work-around

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 28, 2022, 9:07pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/17 "2022-04-28T21:07:03Z")

</div>

Thanks for your hints, I'm actually looking for a fully automated/batch way because I have thousands of tracks to deal with (and I'm already able to export lyrics for 1 track at a time with 1 click, so your step #2 will actually make the process longer).

I'm currently using a command line tool called "kid3-cli" because [it's said to be able to read/export lyrics](https://cweiske.de/tagebuch/embedded-lyrics.htm#kid3)

So when I place an audio file called "a.mp3" in the same directory as the "kid3-cli.exe", then run:

> select a.mp3  
> get USLT:‘a.lrc’

I can get exported lyrics in the "a.lrc" file (ANSI encoding).  
How do I convert the above two lines of command into the "Parameter" field of Mp3tag Tools, so that I can export multiple tracks at once?  
(I already set the "Path" to that of "kid3-cli.exe")

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [April 28, 2022, 11:20pm UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/18 "2022-04-28T23:20:20Z")

</div>

> [@tagger](#):
>
> How do I convert the above two lines of command into the "Parameter" field of Mp3tag Tools, so that I can export multiple tracks at once?

That is a question for the people who support Kid3 Tag Editor because it concerns their command line usage.  
But I took a few hours and came up with this:

` -c select "%_path%" -c "get USLT:''%_filename%.lrc''"`

An LRC file will be created beside each selected file.  
The single quotes are doubled because they are [special characters](https://docs.mp3tag.de/format/#characters-with-special-functionality) in Mp3tag and must be escaped to be used literally.

---

<div class="post-metadata">

### Author: ![tagger](https://community.mp3tag.de/user_avatar/community.mp3tag.de/tagger/32/11538_2.png) [@tagger](https://community.mp3tag.de/u/tagger)
#### Post date: [April 29, 2022, 12:09am UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/19 "2022-04-29T00:09:42Z")

</div>

> The single quotes are doubled because they are [special characters](https://docs.mp3tag.de/format/#characters-with-special-functionality) in Mp3tag and must be escaped to be used literally.

Wow I didn't know that, no wonder why my params weren't working, you were super helpful!

I tested your param code and it outputs lrc file for each track, that's awesome! but somehow many Unicode characters (e.g. Korean characters) in lyrics became "?"s (question marks) after the exporting, and EOL characters went from CRLF to CRCRLF, which caused a blank line between each original line.

Could you think of any workaround for these issues?

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [April 29, 2022, 7:57am UTC](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158/20 "2022-04-29T07:57:17Z")

</div>

> [@tagger](#):
>
> Could you think of any workaround for these issues?

I hope you've read the documentation for Kid3 Tag Editor.  
I glanced at it briefly and [found a command](https://docs.kde.org/trunk5/en/kid3/kid3/kid3-cli.html#cli-textencoding) that sounds as if it should enable Unicode text to be retrieved.  
However, I couldn't use it to retrieve Unicode text.  
It is either broken, or doesn't do what I expected, or I haven't figured out how to use it correctly.  
Maybe you'll have better luck.

Meanwhile, my original suggestion (using cmd.exe without kid3-cli) can be modified to give Unicode text by adding the Unicode switch (`/U`).  
And that method does not produce extra blank lines.  
I've also generalized the parameter so that the tool can be used for tag formats that do not use the language prefix (eg. Vorbis Comments in FLAC files).

Parameter: `/U /c echo $regexp($regexp(%unsyncedlyrics%,^\w+\|\|,),\r\n,##) > "%_folderpath%%_filename%.lrc"`

[Next page](https://community.mp3tag.de/t/feature-request-batch-export-lyrics-into-individual-files-txt-lrc/57158.md?page=2)
