# How to make a loop of artist within file from ARTIST field to ALBUMARTISTSORT field

**URL:** https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698
**Category:** Support
**Created:** [February 26, 2016, 9:08am UTC](https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698 "2016-02-26T09:08:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![imanish](https://community.mp3tag.de/user_avatar/community.mp3tag.de/imanish/32/467_2.png) [@imanish](https://community.mp3tag.de/u/imanish)
#### Post date: [February 26, 2016, 9:08am UTC](https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698/1 "2016-02-26T09:08:17Z")

</div>

How to make loop of artist within file

Hi guys,

I searched few hours and looked up some topics but didn't get what I exactly want.

Actually I have album as:

Track01 - Artist1, Artist2  
Track02 - Artist2, Artist3  
Track03 - Artist4, Artist3  
Track04 - Artist1, Artist4  
Track05 - Artist3, Artist4

I want to put all of the artists from artist field into ALBUMARTISTSORT field as a loop as:

Artist1, Artist2, Artist3, Artist4

or make the loop as they are as:

Artist1, Artist2, Artist2, Artist3, Artist4, Artist3, Artist1, Artist4, Artist3, Artist4

When I export the tag I use this syntax as:

$loop(%\_filename\_ext%) $replace(%artist%,&,&), $loopend()

and it makes the loop perfectly but I want to put it within the file with any action.

I already had a look at the topic as:

[/t/14438/1](https://community.mp3tag.de/t/14438/1)

[/t/14390/1](https://community.mp3tag.de/t/14390/1)

but didn't get what I want.

Please suggest me how to do.

Thanks in advance.

---

<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: [February 26, 2016, 9:47am UTC](https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698/2 "2016-02-26T09:47:49Z")

</div>

> [@Manish Kumar Singh](#):
>
> How to make loop of artist within file ... I want to put all of the artists from artist field into ALBUMARTISTSORT field as a loop as:  
> Artist1, Artist2, Artist3, Artist4 ... Please suggest me how to do. Thanks in advance.

For such a task there is no other way within Mp3tag as to export data, modify data within the export script, and later import the resulting data into the tag within the audio file by applying "Convert Textfile to Tag".

Please study and apply this proposal ...  
[Listing all Artists from Album into One Tag Field](https://community.mp3tag.de/t/14438/10)  
... and try out the other offered export scripts too.

DD.20160226.1147.CET

---

<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: [February 27, 2016, 9:01am UTC](https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698/3 "2016-02-27T09:01:54Z")

</div>

> [@Manish Kumar Singh](#):
>
> ...  
> I want to put all of the artists from artist field into ALBUMARTISTSORT field as a loop as:  
> ...Artist1, Artist2, Artist2, Artist3, Artist4, Artist3, Artist1, Artist4, Artist3, Artist4  
> ...

What is the real problem?  
Do you really want to use the ALBUMARTISTSORT field to sort the album artists? Or is it some kind of other field?  
Because collecting all artists from all track of a sampler does not make real sense to me.

Anyway: if you have several artists in several ARTIST fields, you can merge these multivalue fields to one and export that. Because like this, you will probably get only the first ARTIST.

Also: would it be worth to loop around the artist name instead of the filename? THis would rule out duplicates if you use the ",1)" syntax for $loop().  
MP3tag does not know anything about the previous or the next track. So it is not possible to compare, copy or move data between files (unless you do it manually).  
If you want to do that, you have to use the export function and process the data there.

---

<div class="post-metadata">

### Author: ![imanish](https://community.mp3tag.de/user_avatar/community.mp3tag.de/imanish/32/467_2.png) [@imanish](https://community.mp3tag.de/u/imanish)
#### Post date: [March 8, 2016, 7:04am UTC](https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698/4 "2016-03-08T07:04:53Z")

</div>

> [@DetlevD](#):
>
> For such a task there is no other way within Mp3tag as to export data, modify data within the export script, and later import the resulting data into the tag within the audio file by applying "Convert Textfile to Tag".
> 
> Please study and apply this proposal ...  
> [Listing all Artists from Album into One Tag Field](https://community.mp3tag.de/t/14438/10)  
> ... and try out the other offered export scripts too.
> 
> DD.20160226.1147.CET

thanks for quick response,  
I went through that and and just created some actions to export and import the artists.

---

<div class="post-metadata">

### Author: ![imanish](https://community.mp3tag.de/user_avatar/community.mp3tag.de/imanish/32/467_2.png) [@imanish](https://community.mp3tag.de/u/imanish)
#### Post date: [March 8, 2016, 7:09am UTC](https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698/5 "2016-03-08T07:09:26Z")

</div>

> [@ohrenkino](#):
>
> What is the real problem?  
> Do you really want to use the ALBUMARTISTSORT field to sort the album artists? Or is it some kind of other field?  
> Because collecting all artists from all track of a sampler does not make real sense to me.
> 
> Anyway: if you have several artists in several ARTIST fields, you can merge these multivalue fields to one and export that. Because like this, you will probably get only the first ARTIST.
> 
> Also: would it be worth to loop around the artist name instead of the filename? THis would rule out duplicates if you use the ",1)" syntax for $loop().  
> MP3tag does not know anything about the previous or the next track. So it is not possible to compare, copy or move data between files (unless you do it manually).  
> If you want to do that, you have to use the export function and process the data there.

Thanks,

Actually I wanted to make a loop of all singers of an album.

and doing it by export & import option only.

---

<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:26pm UTC](https://community.mp3tag.de/t/how-to-make-a-loop-of-artist-within-file-from-artist-field-to-albumartistsort-field/17698/6 "2026-02-09T12:26:07Z")

</div>


