# Action formatting files

**URL:** https://community.mp3tag.de/t/action-formatting-files/2590
**Category:** Support
**Created:** [December 6, 2005, 4:53pm UTC](https://community.mp3tag.de/t/action-formatting-files/2590 "2005-12-06T16:53:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![isthisthingon](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@isthisthingon](https://community.mp3tag.de/u/isthisthingon)
#### Post date: [December 6, 2005, 4:53pm UTC](https://community.mp3tag.de/t/action-formatting-files/2590/1 "2005-12-06T16:53:38Z")

</div>

Hi,  
I'd like to convert tagfields, filenames & paths like album or artist from "The Whatever" to "Whatever, The". There'll surely be a way to master this with a script but yeah, of course, I'm a complete newbie with this, so i would be very grateful if sb. could help me with this.  
Thanks in advance!

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [December 6, 2005, 5:50pm UTC](https://community.mp3tag.de/t/action-formatting-files/2590/2 "2005-12-06T17:50:11Z")

</div>

Have a look at this very basic action:

Action #1:  
_Action type:_ **Replace with regular expressions**  
_Field:_ **\_ALL**  
_Regular expression:_ **(The) (.\*)**  
_Replace matches with:_ **$2, $1**

[] case-sensitive comparison

However, stuff like "The Rolling Stones feat. The Beatles" is going to be changed to "Rolling Stones feat. The Beatles, The". I have no idea how to change that to "Rolling Stones, The feat. Beatles, The" using MP3Tag.

---

<div class="post-metadata">

### Author: ![isthisthingon](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@isthisthingon](https://community.mp3tag.de/u/isthisthingon)
#### Post date: [December 6, 2005, 6:14pm UTC](https://community.mp3tag.de/t/action-formatting-files/2590/3 "2005-12-06T18:14:17Z")

</div>

That's not a problem to me, i just want to sort all artist and albums in alphabetic order. It's also bloody annoying when you can't mark the desired folder by typink the first character.  
Thanks a lot, your support is so amazing!

---

<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: [December 10, 2005, 9:00pm UTC](https://community.mp3tag.de/t/action-formatting-files/2590/4 "2005-12-10T21:00:59Z")

</div>

> [@](#):
>
> Have a look at this very basic action:
> 
> Action #1:  
> _Action type:_ **Replace with regular expressions**  
> _Field:_ **\_ALL**  
> _Regular expression:_ **(The) (.\*)**  
> _Replace matches with:_ **$2, $1**
> 
> [] case-sensitive comparison

I think you may want to anchor that expression so that it only does this for leading articles. The following action will remove leading articles The, Los, Les, and Le from the artist name:

Action #1:  
_Action type:_ **Replace with regular expressions**  
_Field:_ **ARTIST**  
_Regular expression:_ **^(the|los|les|le)\s+(.\*)**  
_Replace matches with:_ **$2, $1**

[] case-sensitive comparison

This will change

The Rolling Stones -\> Rolling Stones, The

but avoids

Tom Petty & The Heartbreakers -\> Tom Petty & Heartbreakers, The

---

<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-formatting-files/2590/5 "2026-02-09T12:19:32Z")

</div>


