# Export to multiple txt files

**URL:** https://community.mp3tag.de/t/export-to-multiple-txt-files/11427
**Category:** Support
**Created:** [January 11, 2011, 6:09pm UTC](https://community.mp3tag.de/t/export-to-multiple-txt-files/11427 "2011-01-11T18:09:05Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [January 13, 2011, 8:46am UTC](https://community.mp3tag.de/t/export-to-multiple-txt-files/11427/3 "2011-01-13T08:46:41Z")

</div>

It seems that this proposal still works as designed:  
[Exporting UNSYNCEDLYRICS to Individual Text Files](https://community.mp3tag.de/t/6864/7)

The following Mp3tag mte export file creates a command file, which - when running - creates multiple text files in the same folder, where the music files are stored.

~~**$filename($left(%\_workingpath%,2)\TEST\Export.USLT.cmd,ANSI)'@ECHO OFF'**~~

$loop(%\_folderpath%%\_filename\_ext%)$if(%UNSYNCEDLYRICS%,'SET FILEOUT='$replace(%\_folderpath%%\_filename%,'&','^&','%','%%')'.USLT.txt''IF EXIST "%FILEOUT%" DEL "%FILEOUT%" \>NUL:''ECHO.FILEOUT: "%FILEOUT%"'$regexp($regexp($regexp($char(10)$replace(%UNSYNCEDLYRICS%,'|','^|','\>','^\>','\<','^\<','"','^"','&','^&','%','%%')$char(13),'\n','\nECHO.'),'\r','\>\>"%FILEOUT%"\r'),'^\n(.+)\r$','$1'),)$loopend()'PAUSE'

Export\_USLT\_2.mte ( 491bytes ) Number of downloads: 68

DD.20110113.1046.CET

Because file names may occur, which do not work together with the above export script in the DOS command shell, I have changed the export script as following ...

**01: $filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.Report.USLT.ToFolderFile.cmd',ANSI)'@ECHO OFF'** 

02: 'CHCP 1252 1\>NUL 2\>NUL'  
03: 'SET FILELIST="%USERPROFILE%\Desktop\Mp3tag.Report.USLT.List.txt"'  
04: 'IF EXIST %FILELIST% DEL %FILELIST% \>NUL'  
05: $loop(%\_path%)  
06: $if(%UNSYNCEDLYRICS%,'SET FILEOUT="'$replace(%\_folderpath%%\_filename%,'%','%%')'.USLT.txt"'  
07: 'IF EXIST %FILEOUT% ECHO.%FILEOUT%\>\>%FILELIST%'  
08: 'IF EXIST %FILEOUT% DEL %FILEOUT%\>NUL'  
09: 'ECHO.FILEOUT: %FILEOUT%'  
10: $regexp($regexp($regexp($char(10)$replace(%UNSYNCEDLYRICS%,'|','^|','\>','^\>','\<','^\<','"','^"','&','^&','%','%%')$char(13),'\n','\nECHO.'),'\r','\>\>%FILEOUT%\r'),'^\n(.+)\r$','$1'),)  
11: $loopend()  
12: 'CHCP 850 1\>NUL 2\>NUL'  
13: 'PAUSE'  
14: 'START "" %FILELIST%'

[Export\_CMD\_USLT\_Each\_To\_One\_File.mte](https://community.mp3tag.de/uploads/default/original/2X/0/0cdd5f8958eef25d74a45a58b2435299a14a358e.mte) (724 Bytes)

DD.20120703.1040.CEST

[Export\_CMD\_USLT\_Each\_To\_One\_File.mte](https://community.mp3tag.de/uploads/default/original/2X/0/0cdd5f8958eef25d74a45a58b2435299a14a358e.mte) (724 Bytes)

---

_[View the full topic](https://community.mp3tag.de/t/export-to-multiple-txt-files/11427)._
