# Case Conversion using filename filename

**URL:** <https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451>\
**Category:** Support\
**Created:** [May 16, 2019, 11:25pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451 "2019-05-16T23:25:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [May 16, 2019, 11:25pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/1 "2019-05-16T23:25:22Z")

</div>

I'm not able to turn "official" to "Official" please see my steps below. What can be wrong... Thanks

01 Convert

02 Filename - Filename

03 Old Filename Pattern = %1 - %2 - %3 - %4

04 New Filename Pattern = %1 - %2 $caps(- %3) $caps(- %4)

05 Old Filename  
3A - 123 - COFFEE FT SOULSTAR - You Rock My World (Official Music Video)\_pn.mp3

06 New Filename  
3A - 123 - Coffee Ft Soulstar - You Rock My World (Official Music Video)\_pn.mp3

---

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [May 16, 2019, 11:27pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/2 "2019-05-16T23:27:18Z")

</div>

Sorry Official in old filename is lower case = official. Thanks

---

<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:** [May 17, 2019, 6:10am UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/3 "2019-05-17T06:10:51Z")

</div>

> [@sy45yhtyj](#):
>
> New Filename Pattern = %1 - %2 $caps(- %3) $caps(- %4)

You would have to specify the characters that form the word boundaries, e.g.  
`$caps(-%3,' (')

---

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [May 23, 2019, 10:36pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/4 "2019-05-23T22:36:19Z")

</div>

Thanks.. By the way... is there a way to always have my hyphens look like the filename below?

2A - 147 - Blondie - Call Me\_pn

I will always be using using three hyphens in the filename, but sometimes the hyphens in the filename may look like the bad three examples below:

2A- 147 - Blondie -Call Me\_pn  
2A - 147 - Blondie - Call Me\_pn  
2A -147 -Blondie- Call Me\_pn

What I'm trying to do is always have the hyphens spaced like below:

```
                                 2A - 147 - Blondie - Call Me_pn

```

Characters/white space/hyphen/white space/characters/white space/hyphen/white space/characters/white space/hyphen/white space/characters

Thank You

---

<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:** [May 24, 2019, 4:55am UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/5 "2019-05-24T04:55:14Z")

</div>

You could run 2 action of the type "Replace" for \_FILENAME  
Action 1:  
Search: -  
Replace:`_-_`  
(where \_ represents the space character)  
Action 2:  
Search: \_\_  
Replace: \_  
(as above)

---

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [May 26, 2019, 10:31pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/6 "2019-05-26T22:31:07Z")

</div>

Thanks Ohrenkino..., but if my Action is Replace, wouldn't the:  
Field: _FILENAME  
Original: -  
Replace with: -_  
???

Thanks

---

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [May 26, 2019, 11:06pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/7 "2019-05-26T23:06:19Z")

</div>

Using this works in reverse it adds a space on each side of the hyphen. I just need one space on each side of the hyphen... Any ideas?

Thanks.

Action type = replace with regular expressions

Field = FIELDNAME  
Regular expression = ^(.+?)-(.+?)-(.+?)-(.+?)  
Replace matches with = $1 - $2 - $3 - $4

---

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [May 26, 2019, 11:53pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/8 "2019-05-26T23:53:59Z")

</div>

Got it figured out...

01 Action type = replace with regular expressions  
02 Field = FIELDNAME  
03 Regular expression = \s{1,}  
04 Replace matches with = " " (One space without the quotes)

This will place one space on each side of the 3 hyphens...

e.g. 2A - 111 - The Blackbyrds - Enter In\_pn

Thanks...

---

<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:** [May 27, 2019, 6:28am UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/9 "2019-05-27T06:28:00Z")

</div>

sometimes I hate the forum formatter.  
You can see in [Case Conversion using filename filename](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/5)  
how it was meant to be.  
These 2 actions then work with any amount of hypens in a string.

---

<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 9, 2026, 12:28pm UTC](https://community.mp3tag.de/t/case-conversion-using-filename-filename/45451/10 "2026-02-09T12:28:05Z")

</div>


