# Using parts of filename to replace album and track number fields

**URL:** <https://community.mp3tag.de/t/using-parts-of-filename-to-replace-album-and-track-number-fields/62954>\
**Category:** Support\
**Created:** [December 1, 2023, 4:08pm UTC](https://community.mp3tag.de/t/using-parts-of-filename-to-replace-album-and-track-number-fields/62954 "2023-12-01T16:08:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![timwhitley](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/858c86/32.png) [@timwhitley](https://community.mp3tag.de/u/timwhitley)\
**Post date:** [December 1, 2023, 4:08pm UTC](https://community.mp3tag.de/t/using-parts-of-filename-to-replace-album-and-track-number-fields/62954/1 "2023-12-01T16:08:27Z")

</div>

Hi, Noob to the software however by browsing through the community thread I see that there's a way to update fields via the tag-tag function and I've been able to do some basic things using the examples others have provided. I have a number of audiobooks that are all using the same filename convention but I have not been able to figure out how to do the below.

An example is the filename "Wells, Martha - [The Murderbot Diaries - 7] - System Collapse 2023.m4b"

I'd like to be able to pull the series name "The Murderbot Diaries" into the album field. I would also like to pull the number inside brackets into the track field. The number can be up to 3 digits and can also contain a decimal so in the above, the 7 might be 7.5 or 17.5.

Finally, there are some cases where the book doesn't belong to a series. This would be denoted by [The Murderbot Diaries - 7] being instead [-]. eg. "Wells, Martha - [-] - System Collapse 2023.m4b"  
In those cases, I'd like to make no changes.

Not sure if any of this is possible but would really appreciate any and all guidance. Thanks in advance.

---

<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 1, 2023, 4:17pm UTC](https://community.mp3tag.de/t/using-parts-of-filename-to-replace-album-and-track-number-fields/62954/2 "2023-12-01T16:17:48Z")

</div>

> [@timwhitley](#):
>
> Wells, Martha - [The Murderbot Diaries - 7] - System Collapse 2023.m4b

Try Convert\>Filename-Tag  
Mask: `%dummy% [%album% - %track%]%dummy%`  
Apply a filter to get only those files that should get treated:  
Filter: `NOT %_filename% HAS "[-]"`

---

<div class="post-metadata">

**Author:** ![timwhitley](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/858c86/32.png) [@timwhitley](https://community.mp3tag.de/u/timwhitley)\
**Post date:** [December 1, 2023, 9:40pm UTC](https://community.mp3tag.de/t/using-parts-of-filename-to-replace-album-and-track-number-fields/62954/3 "2023-12-01T21:40:59Z")

</div>

> [@ohrenkino](#):
>
> `NOT %_filename% HAS "[-]"`

That was perfect! Thank you so much for your help!

---

<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 31, 2023, 9:41pm UTC](https://community.mp3tag.de/t/using-parts-of-filename-to-replace-album-and-track-number-fields/62954/4 "2023-12-31T21:41:37Z")

</div>

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