# How do I insert COMPOSER's last name into filename?

**URL:** https://community.mp3tag.de/t/how-do-i-insert-composers-last-name-into-filename/7829
**Category:** Support
**Created:** [January 23, 2009, 12:32pm UTC](https://community.mp3tag.de/t/how-do-i-insert-composers-last-name-into-filename/7829 "2009-01-23T12:32:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![losinj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/a183cd/32.png) [@losinj](https://community.mp3tag.de/u/losinj)
#### Post date: [January 23, 2009, 12:32pm UTC](https://community.mp3tag.de/t/how-do-i-insert-composers-last-name-into-filename/7829/1 "2009-01-23T12:32:25Z")

</div>

Hi,

I have filenames like:

08 Carillon de Longpont.flac

and

1-08 Carillon de Longpont.flac

but need them to be like:

08 Vierne - Carillon de Longpont.flac

and

1-08 Vierne - Carillon de Longpont.flac

where the COMPOSER tag is "Louis Vierne". Composers can also be like "Nicolas Jaques Lemmens", so it's always the last name that I would like inserted.

Is there an elegant way to accomplish this, e.g. with Replace, please?

---

<div class="post-metadata">

### Author: ![losinj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/a183cd/32.png) [@losinj](https://community.mp3tag.de/u/losinj)
#### Post date: [January 23, 2009, 5:30pm UTC](https://community.mp3tag.de/t/how-do-i-insert-composers-last-name-into-filename/7829/2 "2009-01-23T17:30:58Z")

</div>

Managed to kludge this with an Action Group and a temporary tag. I'm very much a novice so there are no doubt neater ways but this seems to work with the above formats although not extensively tested.

**Put composer and filename into temporary tag**  
Action type: Format value  
Field: DUMMY  
Format string: %composer% %\_filename\_ext%  
Result: Louis Vierne 1-08 Carillon de Longpont.flac

**Discard composer first name(s)**  
Action type: Replace with regular expression  
Field: DUMMY  
Regular expression: (._)\s(.+\s(\d-)?\d{2}\s._)  
Replace matches with: $2  
Case-sensitive comparison: []  
Result: Vierne 1-08 Carillon de Longpont.flac

**Swap positions of composer last name and disc-track number, adding hyphen**  
Action type: Replace with regular expression  
Field: DUMMY  
Regular expression: (.\*)\s((\d-)?\d{2})\s(.+)  
Replace matches with: $2 $1 - $4  
Case-sensitive comparison: []  
Result: 1-08 Vierne - Carillon de Longpont.flac

**Update filename from dummy tag**  
Action type: Format value  
Field: \_FILENAME  
Format string: %dummy%

**Clean up**  
Action type: Remove fields  
Fields to remove: DUMMY

---

<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:21pm UTC](https://community.mp3tag.de/t/how-do-i-insert-composers-last-name-into-filename/7829/3 "2026-02-09T12:21:20Z")

</div>


