# An efficient / quick way to make playlist of looped files - or some alternative?

**URL:** https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273
**Category:** Support
**Created:** [April 28, 2019, 11:07am UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273 "2019-04-28T11:07:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [April 28, 2019, 11:07am UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/1 "2019-04-28T11:07:59Z")

</div>

Putting aside why and what for, what I do is this:

#1] Create a new FOLDER

#2] Copy some audio files to it- in various formats. So I have something like:

```auto
File A.mp3

Performance B.mp3

Song C.flac

Track D.wv

```

#3] Arrange them mostly alphabetically, rarely with sight variations- thus change their FILENAMEs according to my needs. So I might have something like:

```auto
F Track D.wv

File A.mp3

Performance B.mp3

Song C.flac

```

#4] Multiply most of the files- some time to as little as 2-3 instances, sometimes to as much as 15-25. In order to do that I simply press CTRL + C and the press and hold CTRL + V

#5] Load everything to Mp3tag and execute an action on it, that replaces all those `- Copy (2)` with something like `DUPLICATE-01`, `- Copy (3)` with `DUPLICATE-02` etc.- so that all files in such Folder will look more readable. The result might be like this:

```auto
F Track D.wv
F Track D DUPLICATE-01.wv
F Track D DUPLICATE-01.wv
F Track D DUPLICATE-02.wv
F Track D DUPLICATE-03.wv
F Track D DUPLICATE-04.wv
File A.mp3
File A DUPLICATE-01.mp3
File A DUPLICATE-02.mp3
File A DUPLICATE-03.mp3
File A DUPLICATE-04.mp3
File A DUPLICATE-05.mp3
File A DUPLICATE-06.mp3
File A DUPLICATE-07.mp3
File A DUPLICATE-08.mp3
File A DUPLICATE-09.mp3
File A DUPLICATE-10.mp3
File A DUPLICATE-11.mp3
File A DUPLICATE-12.mp3
File A DUPLICATE-13.mp3
File A DUPLICATE-14.mp3
File A DUPLICATE-15.mp3
File A DUPLICATE-16.mp3
File A DUPLICATE-17.mp3
File A DUPLICATE-18.mp3
File A DUPLICATE-19.mp3
Performance B.mp3
Song C.flac
Song C DUPLICATE-01.flac
Song C DUPLICATE-02.flac
Song C DUPLICATE-03.flac
Song C DUPLICATE-04.flac
Song C DUPLICATE-05.flac
Song C DUPLICATE-06.flac
Song C DUPLICATE-07.flac
Song C DUPLICATE-08.flac
Song C DUPLICATE-09.flac
Song C DUPLICATE-10.flac
Song C DUPLICATE-11.flac
Song C DUPLICATE-12.flac
Song C DUPLICATE-13.flac
Song C DUPLICATE-14.flac

```

``  
All of that has worked fine for me for some time. But now I find myself having in such folders 500, 800 or even over 1000 files. And most of them are those DUPLICATEs, often with very long original FILENAMEs. And so It is simply hard to navigate through them in both a file manager and in Mp3tag- all I do is scroll, scroll and scroll through them. And on top of that there is the problem of shrinking hard disk space, as all those FOLDERs I must keep for archive reason and reference in the feature. And also sometimes I need to load all of the past FOLDERs to Mp3tag, which takes my hardware more and more time with every month to perform

And so I came up with this idea. Instead of creating DUPLICATEs, I will make an M3U8 playlist. So in this example it comes down to having in the FOLDER files:

```auto
F Track D.m3u8
F Track D.wv
File A.m3u8
File A.mp3
Performance B.mp3
Song C.flac
Song C.m3u8

```

and with these 3 playlist looking like this

```auto
#EXTM3U
F Track D.wv
F Track D.wv
F Track D.wv
F Track D.wv

```

```auto
#EXTM3U
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3
File A.mp3

```

```auto
#EXTM3U
Song C.flac
Song C.flac
Song C.flac
Song C.flac
Song C.flac
Song C.flac
Song C.flac
Song C.flac
Song C.flac

```

[The `Performance B.mp3` was not DUPLICATEd as not everything needs to be repeated / looped]

I need such playlist [not evoking paths], so that the FOLDERs can be moved around hard drives, as I need those playlist [i.e. loops] to work also in the future, wherever the whole FOLDERs [not merely playlist files] might end up  
``  
``  
So what is my problem? **The time**

I can perform swiftly the first 3 steps described in the beginning. But then I have to:

A] manually create a playlist for a given file

B] open that file with Notepad or whatever

C] remove from it the path to the file

D] manually copy the name of the file within the playlist file as many times as I need, counting the copies / lines  
``  
But the only convenience I was able to incorporate into hat process was the usage of software that displays the numbers of lines [so that I can see how many "DUPLICATEs" I have already inserted into the playlist]

So multiply that by dozens of Tracks / Files / Performances / Songs and you will get a picture how tedious and erroneous the whole shebang becomes. And then comes another one job like that and another one  
``  
``  
So is there an easy way to generate such playlists? So that I could have only once instance of every file in the FOLDER and then execute something, which would add to them a ready to use playlist? I could settle for something that would create 50 entries in the playlist and then manually remove the excess from every one- but the ideal solution would be an ability to generate a playlist file with the exact number of loops that I want, thus without a need to adjust it later on

I also fought of being able to link such M3U8 files to some one big folder that would host the actual files, using later on only the playlists- but that would start to fall apart with any changes to the FILENAMEs [and within FOLDERs I do not change the FILENAMEs]

And I would need to be able to load all those playlists to Mp3tag- as I need to see the data from the tag fields. And I know that by loading up `Song C.flac` and `Song C.m3u8` I will see only one instance of `Song C` in Mp3tag and 15 in Winamp- but that is exactly what I need to see

---

<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, 2019, 11:34am UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/2 "2019-04-28T11:34:31Z")

</div>

You can use an export script in which you edit the number of repetitions, e.g.  
`$filename(%artist% - %album%.m3u8)#EXTM3U $loop(%_filename_ext%)$repeat(#EXTINF:%_length_seconds%','%artist% - %title%$char(13)$char(10)%_filename_rel%$char(13)$char(10),11) $loopend()`  
This script creates 11 entries of the same file in the file list.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [May 22, 2019, 8:43pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/3 "2019-05-22T20:43:36Z")

</div>

> [@ohrenkino](#):
>
> You can use an export script in which you edit the number of repetitions, e.g.  
> [...]

So if I want to have a total of 15 entries of a given song in Winamp, I can execute an export code like this

`$filename(Loop List.m3u8,utf-8) #EXTINF$loop(%_filename_ext%)$repeat($char(13)$char(10)%_filename_rel%$char(13)$char(10),14)$loopend()`

because it will create an M3U8 file with 14 entries and the 15th will be the actual audio file. I could create variants of this for the number of overall instances that I use [2, 3, 5, 6, 10, 15, 20, 25, 30]. I can somewhat utilize that, so thank you for your code

` `  
` `  
However having to rename the `Loop List.m3u8` for every file would be a real drag. With one file that I need to "multiply" [i.e. to loop] this is great. But If I have a list of something like 50 files and every one has to be looped to a specific number of repetitions and the M3U8 file needs to have in its name put that number of entries [so that I will see that number in a file manager software], this is tedious

Is there a way to put the `_FILENAME` of the selected audio file in the `_FILENAME` of the M3U8 file created- assuming I will make it easier for Mp3tag and select only one audio file [expecting in a result to create one M3U8 file]?

And going further with this:

Is there a way to put accordingly the `_FILENAME` of the every selected audio file in the `_FILENAME` of the M3U8 files created- which would be needed when I will want to create different M3U8 files with just one execution of action [performed on multiple different audio files]? Or is that completely out of the question because Mp3tag is not able to split one list into separate files?

---

<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: [May 23, 2019, 4:28am UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/4 "2019-05-23T04:28:18Z")

</div>

> [@Zerow](#):
>
> However having to rename the `Loop List.m3u8` for every file would be a real drag.

I think you got a number of hints of how to use the different naming options in

> [@Export filename changes by itself](https://community.mp3tag.de/t/export-filename-changes-by-itself/45034):
>
> I have multiple export scripts. I export them to this file C:\Users\MY-USER-NAME\Documents\Mp3tag export list %\_DATETIME%.txt [which I took from this topic [Multiple export results at the same time are not available](https://community.mp3tag.de/t/multiple-export-results-at-the-same-time-are-not-available/41961)]. This allows me to display multiple export results without the need of leaving the Mp3tag and renaming existing TXT file Unfortunately when I select from my list of export scripts this one $getEnv(TEMP)\Send\_To\_Audacity.vbs [which I took from this topic [Send tracks to Audaci…](https://community.mp3tag.de/t/send-tracks-to-audacity-with-an-export-script/18019)

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [May 23, 2019, 9:07pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/5 "2019-05-23T21:07:37Z")

</div>

So to answer my question: there is no way to do that in Mp3tag? To have one export action that creates playlist with 2 loops, that can be applied to any audio file - and copy the name of that audio file to the name of the M3U8 file? And then a mutation of it that creates 3, and another for 5, etc. So that I will end up with 9 actions?  
``  
``  
I think I need something like a BAT file, that will do what that already working action does- but naming the M3U8 file accordingly. But I would need a shortcut for it to be in my shell menu, so that I can select a particular file. But then again- I would need 9 entries in my shell; which is unacceptable waste of space. Or just one BAT, that would simply ask me for the number of loops to be put in the M3U8 file being created by it. And this is way over my head

---

<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: [May 24, 2019, 5:00am UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/6 "2019-05-24T05:00:40Z")

</div>

> [@Zerow](#):
>
> So to answer my question: there is no way to do that in Mp3tag?

The linked thread shows numerous ways to get variable filenames for exports.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 1:02pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/7 "2019-06-12T13:02:09Z")

</div>

So in order to get 15 entries loops in a playlist that bears the name of a single selected file, I go now with

`$filename(%_FILENAME%.m3u8,utf-8)#EXTINF$loop(%_filename_ext%)$repeat($char(13)$char(10)%_filename_rel%$char(13)$char(10),15)$loopend()`

This is probably as close as I can get to what I need if using Mp3tag  
``  
``  
The only other adjustment I can add to this is to get rid of the empty lines in the generated files. As right now with that code I get 31 lines instead of 15. [And if I see no empty lines then I can look at the margin of my Notepad2 and see how many instances does a given playlist hold] But I do not know how, as I already have squeezed all of the code into one single line

---

<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: [June 12, 2019, 1:36pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/8 "2019-06-12T13:36:32Z")

</div>

remove

> [@Zerow](#):
>
> $char(13)$char(10)

to see if the layout then satisfies your needs.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 2:47pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/9 "2019-06-12T14:47:36Z")

</div>

Removal of that puts all of the exported data into one line

And if I modify it to

`$filename(%_FILENAME%.m3u8,utf-8)#EXTINF$loop(%_filename_ext%)$repeat(%_filename_rel%,15) $loopend()`

then I get 2 lines, with the second one being empty and the first one still holding all of data

---

<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: [June 12, 2019, 2:51pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/10 "2019-06-12T14:51:31Z")

</div>

it might have been worthwhile to remove first one

> [@Zerow](#):
>
> $char(13)$char(10)

(which is a line feed) and then another. Feel free to experiment. It is your layout.  
And as far as I know, empty lines in a playlist do not matter, they are just cosmetic.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 3:15pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/11 "2019-06-12T15:15:55Z")

</div>

This version works the way I prefer

`$filename(%_FILENAME%.m3u8,utf-8)#EXTINF$loop(%_filename_ext%)$repeat(%_filename_rel%$char(13)$char(10),15)$loopend()`

so thank you once more  
``  
``  
As for cosmetics- that is true. But the [bonus] point it for that playlist to be more readable when viewed in TXT editor,so that it would show number of instances [loops] at a glance

---

<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:28pm UTC](https://community.mp3tag.de/t/an-efficient-quick-way-to-make-playlist-of-looped-files-or-some-alternative/45273/12 "2026-02-09T12:28:03Z")

</div>


