# Create action to change filename to title field

**URL:** https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067
**Category:** Support
**Created:** [January 6, 2025, 9:53pm UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067 "2025-01-06T21:53:13Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![cyraxote](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cyraxote/32/18574_2.png) [@cyraxote](https://community.mp3tag.de/u/cyraxote)
#### Post date: [January 6, 2025, 9:53pm UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/1 "2025-01-06T21:53:13Z")

</div>

I can do this easily with "Convert," but I can't figure out how to do it with an Action. I've tried to follow the FAQ here: [Actions and batch-operations - #16 by Florian](https://community.mp3tag.de/t/actions-and-batch-operations/967/16)

I have:

ACTION: Format value  
FIELD: Filename  
FORMAT STRING: %title%

but that's not working.

Any help would be appreciated.

Thanks.

---

<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: [January 6, 2025, 10:10pm UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/2 "2025-01-06T22:10:52Z")

</div>

It's field `_FILENAME` see also [Format Value – Mp3tag Documentation](https://docs.mp3tag.de/actions/format/)

---

<div class="post-metadata">

### Author: ![cyraxote](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cyraxote/32/18574_2.png) [@cyraxote](https://community.mp3tag.de/u/cyraxote)
#### Post date: [January 6, 2025, 11:34pm UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/3 "2025-01-06T23:34:41Z")

</div>

OK, that worked. But now I'm trying to create an action to replace the title with  
$num(%track%,2) - %title% - %Album% - %Artist%

So I have:  
REPLACE  
FIELD: TITLE  
ORIGINAL: %title%  
REPLACE WITH: $num(%track%,2) - %title% - %Album% - %Artist%

And I don't understand why that doesn't work.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [January 7, 2025, 1:34am UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/4 "2025-01-07T01:34:08Z")

</div>

Don't use the REPLACE action. Use Format Value instead. The Replace function is looking for a specific string in a field (you specified Title) and replacing it with another.

---

<div class="post-metadata">

### Author: ![cyraxote](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cyraxote/32/18574_2.png) [@cyraxote](https://community.mp3tag.de/u/cyraxote)
#### Post date: [January 7, 2025, 2:54am UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/5 "2025-01-07T02:54:26Z")

</div>

I'm pretty sure I tried REPLACE and it didn't work... But I may have been doing something wrong.

---

<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: [January 7, 2025, 6:10am UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/6 "2025-01-07T06:10:46Z")

</div>

> [@cyraxote](#):
>
> I'm pretty sure I tried REPLACE and it didn't work

Yes. "Replace" needs a fixed string and does not accept variables. Or the other way round: the function would look in TITLE literally for the string "%title% - which would be rather unusual for a hit.

---

<div class="post-metadata">

### Author: ![cyraxote](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cyraxote/32/18574_2.png) [@cyraxote](https://community.mp3tag.de/u/cyraxote)
#### Post date: [January 7, 2025, 6:40am UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/7 "2025-01-07T06:40:24Z")

</div>

I'm sorry, I meant to say that I tried Format Value and it didn't work. But again, I could be doing wrong.

---

<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: [January 7, 2025, 6:44am UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/8 "2025-01-07T06:44:17Z")

</div>

Then show us the settings for "Format value"

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [January 7, 2025, 7:20am UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/9 "2025-01-07T07:20:12Z")

</div>

> [@cyraxote](#):
>
> I tried Format Value and it didn't work.

Please show us a [screenshot](https://community.mp3tag.de/t/hints-for-asking-support-requests/56190#use-screenshots-to-exemplify-the-issue-2) from your Action attempt.

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [January 7, 2025, 10:28am UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/10 "2025-01-07T10:28:52Z")

</div>

> [@cyraxote](#):
>
> OK, that worked. But now I'm trying to create an action to replace the title with  
> $num(%track%,2) - %title% - %Album% - %Artist%

Do you really want to have a title with these informations?  
It looks to me for a typical scheme for a filename, not a title.

---

<div class="post-metadata">

### Author: ![cyraxote](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cyraxote/32/18574_2.png) [@cyraxote](https://community.mp3tag.de/u/cyraxote)
#### Post date: [January 7, 2025, 4:13pm UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/11 "2025-01-07T16:13:41Z")

</div>

I got it working.

I use all that because I play MP3s from a flash drive in my car, and the car pulls only the title from the MP3s.

---

<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 6, 2025, 4:14pm UTC](https://community.mp3tag.de/t/create-action-to-change-filename-to-title-field/67067/12 "2025-02-06T16:14:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
