# Extract number in filname, replace track number

**URL:** https://community.mp3tag.de/t/extract-number-in-filname-replace-track-number/62958
**Category:** Mac
**Created:** [December 2, 2023, 1:04am UTC](https://community.mp3tag.de/t/extract-number-in-filname-replace-track-number/62958 "2023-12-02T01:04:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![killer00](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/e79b87/32.png) [@killer00](https://community.mp3tag.de/u/killer00)
#### Post date: [December 2, 2023, 1:04am UTC](https://community.mp3tag.de/t/extract-number-in-filname-replace-track-number/62958/1 "2023-12-02T01:04:36Z")

</div>

Hi MP3TAG team,

I've looked through similar posts and I cannot find my answer, so I was hoping you could help. I'm using the Mac version and am trying to do the following:

1. My file names are structured like "69 - Solardo - VIP Business.m4a"
2. I need to make the "69" the track number

I've tried different actions and using RegEx, but I'm having no luck.

Thanks in advance,  
Killer00

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [December 2, 2023, 4:15am UTC](https://community.mp3tag.de/t/extract-number-in-filname-replace-track-number/62958/2 "2023-12-02T04:15:48Z")

</div>

> [@Rename Files and Import Tags from Files](https://community.mp3tag.de/t/rename-files-and-import-tags-from-files/51720#import-tags-from-files-4):
>
> Mp3tag provides a variety of possibilities to get tag information from parts of the filename or to rename files based on the information stored in the tag of a file. The base concept behind all converters in Mp3tag is the format string, which describes a pattern or template of a filename. A format string consists of any characters and predefined placeholders or scripting functions. Every placeholder begins with the percent sign %, followed by a tag field name and ends with the percent sign. …

---

<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: [December 2, 2023, 6:20am UTC](https://community.mp3tag.de/t/extract-number-in-filname-replace-track-number/62958/3 "2023-12-02T06:20:24Z")

</div>

> [@killer00](#):
>
> I've tried different actions and using RegEx, but I'm having no luck.

It would have been interesting to see which ones you tried as then it would be easier to go on from there.

Try Convert\>Filename-Tag  
Mask: %track% - %dummy%

---

<div class="post-metadata">

### Author: ![killer00](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/e79b87/32.png) [@killer00](https://community.mp3tag.de/u/killer00)
#### Post date: [December 6, 2023, 10:30pm UTC](https://community.mp3tag.de/t/extract-number-in-filname-replace-track-number/62958/4 "2023-12-06T22:30:10Z")

</div>

Amazing. Cheers to you! 🙏

---

<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: [January 5, 2024, 10:30pm UTC](https://community.mp3tag.de/t/extract-number-in-filname-replace-track-number/62958/5 "2024-01-05T22:30:50Z")

</div>

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