# Action to create ARTISTSORT tag

**URL:** https://community.mp3tag.de/t/action-to-create-artistsort-tag/2166
**Category:** Support
**Created:** [August 7, 2005, 3:54pm UTC](https://community.mp3tag.de/t/action-to-create-artistsort-tag/2166 "2005-08-07T15:54:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [August 7, 2005, 3:54pm UTC](https://community.mp3tag.de/t/action-to-create-artistsort-tag/2166/1 "2005-08-07T15:54:34Z")

</div>

I'm looking for help creating actions to do the following in flac files:

Create an ARTISTSORT tag by either:

[1] taking the ARTIST field and reversing first & last names, separated by a comma, as in [lastname], [firstname]. For this purpose I think we can assume that the lastname is the final word in the name. For example, Stevie Ray Vaughan -\> Vaughan, Stevie Ray.

or

[2] taking the ARTIST and deleting any leading articles like "The", "Los", etc.

I want to create two actions for the cases above. One would be used for 'individual artists' and one for 'groups'.

Since many tracks are already have an ARTISTSORT tag, I'd like the action to replace the tag if it already exists, otherwise create one, but it cannot create a second ARTISTSORT tag.

---

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [August 7, 2005, 4:18pm UTC](https://community.mp3tag.de/t/action-to-create-artistsort-tag/2166/2 "2005-08-07T16:18:48Z")

</div>

> [@](#):
>
> Create an ARTISTSORT tag by either:
> 
> [1] taking the ARTIST field and reversing first & last names, separated by a comma, as in [lastname], [firstname]. For this purpose I think we can assume that the lastname is the final word in the name. For example, Stevie Ray Vaughan -\> Vaughan, Stevie Ray.
> 
> or
> 
> [2] taking the ARTIST and deleting any leading articles like "The", "Los", etc.

I think I just found the answer to #1 in the pinned post on Regular Expressions:

[Regular Expressions](https://community.mp3tag.de/t/521/1)

I think I can probably figure out #2 now.

Another question, though: Am I correct in the way I'm doing this?

I have a multi-step action that first copies (format) ARTIST to ARTISTSORT. It then does a regex replace on ARTISTSORT. Is that the right way to do this - in two steps?

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [August 8, 2005, 6:56pm UTC](https://community.mp3tag.de/t/action-to-create-artistsort-tag/2166/3 "2005-08-08T18:56:52Z")

</div>

> [@](#):
>
> Another question, though: Am I correct in the way I'm doing this?
> 
> I have a multi-step action that first copies (format) ARTIST to ARTISTSORT. It then does a regex replace on ARTISTSORT. Is that the right way to do this - in two steps?
> 
> \<{POST\_SNAPBACK}\>

Yes, that's is the right way of doing this 🙂

Best regards,  
~ Florian

---

<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:19pm UTC](https://community.mp3tag.de/t/action-to-create-artistsort-tag/2166/4 "2026-02-09T12:19:25Z")

</div>


