# Problem with filename-filename conversion

**URL:** <https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695>\
**Category:** Support\
**Created:** [March 14, 2015, 6:45pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695 "2015-03-14T18:45:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nachtgoblin24](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/e9bcb4/32.png) [@nachtgoblin24](https://community.mp3tag.de/u/nachtgoblin24)\
**Post date:** [March 14, 2015, 6:45pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/1 "2015-03-14T18:45:30Z")

</div>

Hello,  
I've got a problem with renaming files I downloaded with jdownloader. When I download files from YT with jdownloader it automatically adds the bitrate of the file to end of the filename.  
A filename then looks like this:  
Flexxa - Pirahna (256 kbit\_s).mp3

But there are lots of remixes and bootlegs that have the original song artist and title at the beginning followed by the remixing artist in brackets.  
The filename then looks like that:  
Freedom Fry - Shaky Ground (Feast. Remix) (256 kbit\_s).mp3  
Ed Sheeran - Stay With Me (RUOBIN Edit) \_ Sam Smith Cover (192 kbit\_s).mp3  
Ivan B - Make It Ourselves (ft. Hendersin) (Prod. Tido Vegas) (256 kbit\_s).mp3

If I want to rename the file, with the settings:  
old filename: %1 - %2 (%3)  
new filename: %1 %2

,it works perfectly for the ones that don't have another bracket in them. But for those files that have another bracket of any kind in their name, it basically just deletes everything that stands on the right side of said bracket.

I tried changing the settings to :  
old filename: %1 - %2 (%3) (%4)  
new filename: %1 %2 (%3)

,but then the conversion doesn't work for the files that have more or less than 2 brackets in their name.  
Is their a possibility of solving this this problem or does the program simply not support this kind of "unversal" name conversion.  
I would need a way to tell the program that it should only delete the last bracket in the filename or something similyar to that.

Thanks for any answers and help !

---

<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:** [March 14, 2015, 7:21pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/2 "2015-03-14T19:21:32Z")

</div>

> [@nachtgoblin24](#):
>
> H...  
> If I want to rename the file, with the settings:  
> old filename: %1 - %2 (%3)  
> new filename: %1 %2  
> ...
> 
> I tried changing the settings to :  
> old filename: %1 - %2 (%3) (%4)  
> new filename: %1 %2 (%3)  
> ...  
> Thanks for any answers and help !

Why do you mess around with the file names and do not import the data first to the tags and then write a new filename?  
Anyway: we are talking about patterns here and the patterns are different in respect to the brackets.  
So you have to apply a filter to get the one set and then the other.  
e.g.

%\_filename% MATCHES "(._)" AND NOT %\_filename% MATCHES "(._) (._)"  
to get the single pair.  
for the double pair you use  
%\_filename% MATCHES "(._) (.\*)"

But as I said: putting the data in a structured format in the tags first is definitely the better way.

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [March 15, 2015, 5:59am UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/3 "2015-03-15T05:59:12Z")

</div>

> [@nachtgoblin24](#):
>
> ... bitrate of the file to end of the filename. A filename then looks like this: Flexxa - Pirahna (256 kbit\_s).mp3 ... I would need a way to tell the program that it should only delete the last bracket in the filename or something similyar to that.

**For sure set Filter [F3] ...**

**Filter: "%\_filename%" HAS "kbit\_s"  
... or ...  
Filter: "%\_filename%" MATCHES "(\d+ kbit\_s)$"**

 **... then apply Convert "Filename - Filename" with a useful pattern Or apply ... Action: Format value Field: \_FILENAME Formatstring: $trimRight($left(%\_filename%,$strrchr(%\_filename%,'(')),' (') ... or ... Formatstring: $left(%\_filename%,$sub($strrchr(%\_filename%,'('),2)) ... or ... Formatstring: $regexp(%\_filename%,' \(\d+ kbit\_s\)$',)**

DD.20150315.0759.CET

---

<div class="post-metadata">

**Author:** ![nachtgoblin24](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/e9bcb4/32.png) [@nachtgoblin24](https://community.mp3tag.de/u/nachtgoblin24)\
**Post date:** [March 28, 2015, 2:47pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/4 "2015-03-28T14:47:14Z")

</div>

Thanks for the help  
Sorry for replying this late but I didn't get an email update that someone answered my post so I just recognised it.  
I will try your methods out tomorrow, hopefully it works.

@ohrenkino

> [@](#):
>
> Why do you mess around with the file names and do not import the data first to the tags and then write a new filename?

What do you mean by that ? Do you say I should make a filename-tag conversion first and then rename the file by tag-filename?

I appreciate every input

---

<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:** [March 28, 2015, 2:51pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/5 "2015-03-28T14:51:48Z")

</div>

> [@nachtgoblin24](#):
>
> ..What do you mean by that ? Do you say I should make a filename-tag conversion first and then rename the file by tag-filename?...

In a nutshell: yes.  
Filenames are no good place to store data. There are limitations in respect to allowed characters, restrictions in repect to maximum name length and so on.  
The better way is definitely to get the data into the tags and then generate new filenames from the bits and pieces of structured data in the fields.

---

<div class="post-metadata">

**Author:** ![nachtgoblin24](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/e9bcb4/32.png) [@nachtgoblin24](https://community.mp3tag.de/u/nachtgoblin24)\
**Post date:** [April 6, 2015, 6:00pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/6 "2015-04-06T18:00:53Z")

</div>

Thank you guys very much !  
Basically I deleted all the (xxx kbit/s) brackets from the filenames and wrote my tags with the normal %artist% - %title% routine.

By the way, do you guys know a good YT downloader that saves the files in .mp3 format and also saves the album cover links in the tags ?  
that way I could avoid the filename+bitrate problem and also have the covers linked.

But thanks for the help guys !

---

<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:** [April 7, 2015, 3:50am UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/7 "2015-04-07T03:50:17Z")

</div>

> [@nachtgoblin24](#):
>
> ...  
> By the way, do you guys know a good YT downloader that saves the files in .mp3 format and also saves the album cover links in the tags ?  
> that way I could avoid the filename+bitrate problem and also have the covers linked.
> 
> But thanks for the help guys !

MP3tag has web sources scripts to find tag data.

if you want to import the filename without certain pieces of data use the Convert\>Filename-Tag function in such a way (example):  
%artist% - %title% (%dummy% kbits)

---

<div class="post-metadata">

**Author:** ![krazyanna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@krazyanna](https://community.mp3tag.de/u/krazyanna)\
**Post date:** [January 24, 2016, 1:57am UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/8 "2016-01-24T01:57:20Z")

</div>

this is so confusing  
I just want to rename all my filesname to what they are now to  
artist - title

can anyone one help.  
thank you

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [January 24, 2016, 4:11am UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/9 "2016-01-24T04:11:29Z")

</div>

> [@krazyanna](#):
>
> this is so confusing  
> I just want to rename all my filesname to what they are now to  
> artist - title

Does that mean your tags artist and title are filled?  
Then take the converter-menue "Tag- Filename":  
Format String: %artist% - %title%

You can also get this with an action (the converter menue contains predefined actions with preview):  
Type: Format Value  
Field: \_FILENAME  
Format String: %artist% - %title%

---

<div class="post-metadata">

**Author:** ![krazyanna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/a8b319/32.png) [@krazyanna](https://community.mp3tag.de/u/krazyanna)\
**Post date:** [January 24, 2016, 3:17pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/10 "2016-01-24T15:17:59Z")

</div>

didn't select REPLACE!!  
Many Thanks

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [September 11, 2019, 12:19pm UTC](https://community.mp3tag.de/t/problem-with-filename-filename-conversion/16695/13 "2019-09-11T12:19:47Z")

</div>


