# Deleting parts of filenames

**URL:** https://community.mp3tag.de/t/deleting-parts-of-filenames/19450
**Category:** Support
**Created:** [October 18, 2017, 6:50am UTC](https://community.mp3tag.de/t/deleting-parts-of-filenames/19450 "2017-10-18T06:50:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ampmedia](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@ampmedia](https://community.mp3tag.de/u/ampmedia)
#### Post date: [October 18, 2017, 6:50am UTC](https://community.mp3tag.de/t/deleting-parts-of-filenames/19450/1 "2017-10-18T06:50:21Z")

</div>

Hi all

New to Mp3tag. Have searched the forums for an answer to my question and found many questions that is similar to mine, but nothing that answers my precise problem.

I have a lot of files, that contain different numbers at the beginning of each filename. I would like to remove these numbers. My files look like this:

2285186-1-7\_Swans\_Volcano.wav  
9008863-1-1\_Alcest\_Opale.wav  
2360934-1-10\_TV On The Radio\_DLZ.wav

Is it possible to create an action, which removes the numbers, so the filenames will look like this:

\_Swans\_Volcano.wav  
\_Alcest\_Opale.wav  
\_TV On The Radio\_DLZ.wav

Hope to hear from you,  
All best  
Anders

---

<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: [October 18, 2017, 6:54am UTC](https://community.mp3tag.de/t/deleting-parts-of-filenames/19450/2 "2017-10-18T06:54:39Z")

</div>

see e.g. here:  
[/t/12391/1](https://community.mp3tag.de/t/12391/1)  
or here: [/t/8623/1](https://community.mp3tag.de/t/8623/1)

---

<div class="post-metadata">

### Author: ![ampmedia](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@ampmedia](https://community.mp3tag.de/u/ampmedia)
#### Post date: [October 18, 2017, 7:18am UTC](https://community.mp3tag.de/t/deleting-parts-of-filenames/19450/3 "2017-10-18T07:18:53Z")

</div>

Thank you so much!

I used this:  
$regexp(%\_FILENAME%,'^[\d.-]+(.\*)',$1)

My files now look like this:  
\_Swans\_Volcano.wav  
\_Alcest\_Opale.wav  
\_TV On The Radio\_DLZ.wav

If I want to remove the first "\_", is there a way to make changes in: $regexp(%\_FILENAME%,'^[\d.-]+(.\*)',$1)

?

Thank you kindly for your help 🙂

Anders

---

<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: [October 18, 2017, 12:22pm UTC](https://community.mp3tag.de/t/deleting-parts-of-filenames/19450/4 "2017-10-18T12:22:24Z")

</div>

> [@ampmedia](#):
>
> ...  
> I used this:  
> $regexp(%\_FILENAME%,'\[1\]+(.\*)',$1)  
> ...  
> Anders

Use for the initial filename (with number):  
`$regexp(%_FILENAME%,'^[\d\.\-]+_(.*)',$1)`

To get rid of the leading underscore (for those files that have been processed already):  
`$regexp(%_FILENAME%,'^_',)`

* * *

1. \d.-

---

<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: [December 9, 2025, 7:34pm UTC](https://community.mp3tag.de/t/deleting-parts-of-filenames/19450/5 "2025-12-09T19:34:21Z")

</div>

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