# How to split a playlist

**URL:** https://community.mp3tag.de/t/how-to-split-a-playlist/42305
**Category:** Support
**Created:** [July 11, 2018, 2:25pm UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305 "2018-07-11T14:25:08Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 11, 2018, 2:25pm UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/1 "2018-07-11T14:25:08Z")

</div>

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: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [July 11, 2018, 4:31pm UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/2 "2018-07-11T16:31:29Z")

</div>

The solution is not perfect but should save most of the manual work.

Create an export that creates a batch which then in return creates a number of text files.  
`$filename(splitter.bat,utf-8)#EXTM3U $loop(1)echo #EXTINF:%_length_seconds%,%artist% - %title% >> split_$DIV(%_counter%,5).txt echo %_filename_ext% >> split_$div(%_counter%,5).txt $loopend()`  
So, this export script creates a file called splitter.bat.  
it contains 2 lines of command shell echo commands that append text to a file called split\_xyz.txt  
the xyz represents a number that is increased every something steps, in my case 5 - you should use 10 if you want to have 10 entries per file.

So, once the report has been generated, look out in the explorer for a file called splitter.bat. It should be in the current working directory.

Double-click the file splitter.bat.  
This will lead to a number of text files.  
Each of them should be the basis for a playlist - you only have to add the header #extm3u  
And you would have to adapt the file extension.

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 11, 2018, 7:25pm UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/3 "2018-07-11T19:25:12Z")

</div>

Hallo ohrenkino,  
thank you for your answer.  
It works, but not completely: txt files are generated but they are empty.  
You must know that I am the dummiest dummy, where is my mistake?  
Please help me once more.  
Thanks

---

<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: [July 11, 2018, 7:49pm UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/4 "2018-07-11T19:49:42Z")

</div>

> [@mosterry](#):
>
> where is my mistake

Don't know.  
What I had in mind:  
Load the large playlist into MP3tag.  
Select the files.  
Set in tools\>messages that you want to see a message after an export.  
Like that you can see if anything is written to the inital bat-file.  
Now execute the export script and check if the export was successful.  
It should show entries like  
`#EXTM3U`  
`echo #EXTINF:552,Babel - The Return - of Babel >> split_0.txt`  
`echo Ambient Diary.One _ 101 _ Babel _ The Return of Babel.mp3 >> split_0.txt`

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 11, 2018, 8:55pm UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/5 "2018-07-11T20:55:47Z")

</div>

Yes, it's nearly OK,the file starts this way:  
#EXTM3U echo #EXTINF:Whiskeytown - (What You) Think About Me \>\> split\_0.txt echo Adams R - 00 - (What You) Think About Me.mp3 \>\> split\_0.txt echo #EXTINF:Mary Chapin Carpenter - Once in Royal David's City \>\> split\_0.txt echo Carpenter MC - 01 - Once in Royal David's City.mp3 \>\> split\_0.txt echo #EXTINF:Guy Clark - Dublin Blues \>\> split\_0.txt echo Clark Guy - 00 - Dublin Blues.mp3 \>\> split\_0.txt echo.....  
Seems that something like 552 is missed.

---

<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: [July 12, 2018, 5:03am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/6 "2018-07-12T05:03:36Z")

</div>

the 522 is that what %\_length\_seconds% returns. The tracks should have a length, I presume.

The next step would be to execute the file splitter.bat.  
Search for it in the explorer and then double-click it.  
This should lead to a number of text files with a naming patter like split\_0.txt, split\_1.txt and so on. These should work like a playlist.

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 12, 2018, 7:19am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/7 "2018-07-12T07:19:41Z")

</div>

Pardon me,  
now the file is OK:  
#EXTM3U echo #EXTINF:270,Whiskeytown - (What You) Think About Me \>\> split\_0.txt echo Adams R - 00 - (What You) Think About Me.mp3 \>\> split\_0.txt echo #EXTINF:205,Mary Chapin Carpenter - Once in Royal David's City \>\> split\_0.txt echo Carpenter MC - 01 - Once in Royal David's City.mp3 \>\> split\_0.txt echo #EXTINF:261,Guy Clark - Dublin Blues \>\> split\_0.txt echo Clark Guy - 00 - Dublin Blues.mp3 \>\> split\_0.txt.....  
but the text files generated (split\_0.text, split\_1.txt, ...) are absolutely empty (dimension=0, no strings, no words, no numbers).  
Thank you for your patience

---

<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: [July 12, 2018, 7:33am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/8 "2018-07-12T07:33:00Z")

</div>

as you can see, the bat-file is nothing but a collection of command shell commands.  
There should be line breaks btw - I hope that we see only a problem with the forum renderer.

so if you are allowed to create the files, then the spli\_x files should get filled with text.  
I just copied your example to a batch file and executed it and the result was:  
`#EXTINF:270,Whiskeytown - (What You) Think About Me`  
`Adams R - 00 - (What You) Think About Me.mp3`  
`#EXTINF:205,Mary Chapin Carpenter - Once in Royal David's City`  
`Carpenter MC - 01 - Once in Royal David's City.mp3`  
`#EXTINF:261,Guy Clark - Dublin Blues echo Clark Guy - 00 - Dublin Blues.mp3`  
which looks ok to me.

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 12, 2018, 8:34am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/9 "2018-07-12T08:34:42Z")

</div>

I don't understand.  
I copied too in a file bat the three items of my own example and the result is an empty split\_0.txt file.  
In addition, during the execution of the complete splitter.bat I found many unrecognized commands referring to a part of the name of the artist.  
So i thank you again for your help, but I surrend.

---

<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: [July 12, 2018, 9:00am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/10 "2018-07-12T09:00:20Z")

</div>

could you attach or PM the bat-file?  
I would then execute it and send you a zip-archive with the resulting smaller files.  
Or see what is wrong.

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 12, 2018, 9:17am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/11 "2018-07-12T09:17:52Z")

</div>

I upload the spltter.bat file (added zip extension to upload it)  
[splitter.bat.zip](https://community.mp3tag.de/uploads/default/original/2X/5/5190784e6b06389d082c372187aa7a5726af0acb.zip) (694.9 KB)

---

<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: [July 12, 2018, 9:26am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/12 "2018-07-12T09:26:54Z")

</div>

ok, that was wrong: no line breaks in front of the "echo" command.  
I added them.  
If you execute this bat-file, it should lead to filled split\_x files.  
(I added the zip just to trick the uploader - it is not necessary to unzip it)

[splitter.bat.zip](https://community.mp3tag.de/uploads/default/original/2X/d/d993eb210c04a01bbfb916f34253bbce50bb3d4d.zip) (705,6 KB)

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 12, 2018, 9:42am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/13 "2018-07-12T09:42:43Z")

</div>

Thank you, thank you, thank you.  
It works fine.  
Just one more help.  
Learn me How to do, for the next time  
I think there is nothing to do with the export mte, you work on the bat file, so How to add line breaks?

---

<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: [July 12, 2018, 9:55am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/14 "2018-07-12T09:55:22Z")

</div>

In the export script, enter the linebreaks where you want to have them in the output.

The text editor that opens the output file, should not remove linebreaks, though, even if it "thinks" they are superfluous.

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 12, 2018, 10:03am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/15 "2018-07-12T10:03:29Z")

</div>

So in the script I add "" before echo?

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 12, 2018, 10:04am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/16 "2018-07-12T10:04:46Z")

</div>

So in the script i add \ before echo

---

<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: [July 12, 2018, 10:42am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/17 "2018-07-12T10:42:00Z")

</div>

No, you simply hit `<enter>` where you want to have the linebreak.  
In this script this was between .txt and echo.

---

<div class="post-metadata">

### Author: ![mosterry](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/a4c791/32.png) [@mosterry](https://community.mp3tag.de/u/mosterry)
#### Post date: [July 12, 2018, 11:50am UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/18 "2018-07-12T11:50:32Z")

</div>

Perfect.  
Thank you once again.  
You solved my problem

---

<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:27pm UTC](https://community.mp3tag.de/t/how-to-split-a-playlist/42305/19 "2026-02-09T12:27:31Z")

</div>


