# Create an Action to remove date

**URL:** https://community.mp3tag.de/t/create-an-action-to-remove-date/65539
**Category:** Support
**Created:** [August 9, 2024, 7:05pm UTC](https://community.mp3tag.de/t/create-an-action-to-remove-date/65539 "2024-08-09T19:05:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![WayMor](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/ecae2f/32.png) [@WayMor](https://community.mp3tag.de/u/WayMor)
#### Post date: [August 9, 2024, 7:05pm UTC](https://community.mp3tag.de/t/create-an-action-to-remove-date/65539/1 "2024-08-09T19:05:04Z")

</div>

I want to create an Action that will copy the FILE NAME to TITLE.

The FILE NAME format is Artist - Title-dd-mm-yyyy.mp3

I want the TITLE format to be Artist - Title

I can get the FULL File name into the Title but cannot figure out how to get it to drop the -dd-mm-yyyy.mp3

Any help is much appreciated.

---

<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: [August 9, 2024, 7:13pm UTC](https://community.mp3tag.de/t/create-an-action-to-remove-date/65539/3 "2024-08-09T19:13:09Z")

</div>

Try an action of the type "Format value" or use Convert\>Tag-Tag for TITLE  
Format string: `$regexp(%_filename%,(.*?)-\d+.*,$1)`

---

<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: [August 9, 2024, 7:26pm UTC](https://community.mp3tag.de/t/create-an-action-to-remove-date/65539/4 "2024-08-09T19:26:00Z")

</div>

It works for me with  
Convert -\> Tag - Tag  
Field: TITLE  
Format string:  
`$regexp(%_FILENAME%,(.*) - (.*?)-(.*),$1 - $2)`

This version drops everything after the second minus, ignoring if it is a date or something else.

---

<div class="post-metadata">

### Author: ![WayMor](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/ecae2f/32.png) [@WayMor](https://community.mp3tag.de/u/WayMor)
#### Post date: [August 9, 2024, 8:16pm UTC](https://community.mp3tag.de/t/create-an-action-to-remove-date/65539/5 "2024-08-09T20:16:26Z")

</div>

Thanks [ohrenkino](https://community.mp3tag.de/u/ohrenkino) and [LyricsLover](https://community.mp3tag.de/u/LyricsLover), both solutions produced the results I needed.

---

<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: [September 8, 2024, 8:17pm UTC](https://community.mp3tag.de/t/create-an-action-to-remove-date/65539/6 "2024-09-08T20:17:00Z")

</div>

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