# Adding Bpm Right After "- " character

**URL:** https://community.mp3tag.de/t/adding-bpm-right-after-character/64580
**Category:** Support
**Created:** [May 2, 2024, 1:37pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580 "2024-05-02T13:37:40Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Sikky](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Sikky](https://community.mp3tag.de/u/Sikky)
#### Post date: [May 2, 2024, 1:37pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/1 "2024-05-02T13:37:40Z")

</div>

I got folder that contains music that usually is the same bpm  
I want them to be added in my Folder title but not in the end nor the begining  
The folder is currently Named like this :  
Bam Bam Riddim - (1992) [Top Rank - Part 1]

I want to end up like this:  
Bam Bam Riddim - 91bpm (1992) [Top Rank - Part 1]

Because i also have other folder with Just the Year after the "- " or only the producer in between the

Ive asked Chat GPT and it cam up with this script that i added in Action/Format Tag Field/\_DIRECTORY  
`$regexp(%_folderpath%,^(.+?) - (\(\d+\)) \[(.+)\]$, $1 - $2 [$3 BPM])`

This did not work can yall help me ?

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [May 2, 2024, 1:54pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/2 "2024-05-02T13:54:41Z")

</div>

> [@Sikky](#):
>
> Ive asked Chat GPT

Why you don't ask ChatGPT if he/she/it can explain why the solution is not working for you? 😉 😇

> [@Sikky](#):
>
> This did not work can yall help me ?

Maybe.  
First let us know, where exactly the BPM value is stored in your folder name.  
`Bam Bam Riddim - (1992) [Top Rank - Part 1]`

You have to provide the `BPM` value (91 in your example) either in the folder name, the filename or in a tag inside your tracks. Every Action needs to have a source for this value (91) to write it at the desired position in your folder name.

---

<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 2, 2024, 2:03pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/3 "2024-05-02T14:03:33Z")

</div>

> [@Sikky](#):
>
> The folder is currently Named like this :  
> Bam Bam Riddim - (1992) [Top Rank - Part 1]
> 
> I want to end up like this:  
> Bam Bam Riddim - 91bpm (1992) [Top Rank - Part 1]

Try  
Format string: `$regexp(%_directory%,(.*?) - (.*),$1 %bpm%bpm $2)`

---

<div class="post-metadata">

### Author: ![Sikky](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Sikky](https://community.mp3tag.de/u/Sikky)
#### Post date: [May 2, 2024, 2:17pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/4 "2024-05-02T14:17:04Z")

</div>

The mp3s inside the folder contains the 91 bpm in my example and i did ask Chat GPT and got me a Terminal Script instead which didnt work either  
Kinda sad to see a machine cant tell me how the machine works

---

<div class="post-metadata">

### Author: ![Sikky](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Sikky](https://community.mp3tag.de/u/Sikky)
#### Post date: [May 2, 2024, 2:20pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/5 "2024-05-02T14:20:02Z")

</div>

We are very close @ohrenkino  
The only thing wrong is that it erased my separator " - "  
But heres the result :

 ![Screen Shot 2024-05-02 at 10.18.14 AM](https://community.mp3tag.de/uploads/default/original/3X/8/4/84ca3f04e118ab943d64b641b657b1a114e476cf.png)

---

<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 2, 2024, 2:22pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/6 "2024-05-02T14:22:05Z")

</div>

> [@ohrenkino](#):
>
> Format string: `$regexp(%_directory%,(.*?) - (.*),$1 %bpm%bpm $2)`

Then use  
Format string: `$regexp(%_directory%,(.*?) - (.*),$1 - %bpm%bpm $2)`

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [May 2, 2024, 2:22pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/7 "2024-05-02T14:22:48Z")

</div>

> [@Sikky](#):
>
> that usually is the same bpm

Please be aware that your folder will be divided in several different folders as soon as NOT all your mp3 in the folder contains the exactly same BPM value.

---

<div class="post-metadata">

### Author: ![Sikky](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Sikky](https://community.mp3tag.de/u/Sikky)
#### Post date: [May 2, 2024, 2:23pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/8 "2024-05-02T14:23:35Z")

</div>

Thanks you saved me from an excruciating headache

---

<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 2, 2024, 2:24pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/9 "2024-05-02T14:24:18Z")

</div>

> [@LyricsLover](#):
>
> folder will be divided in several different folders

This is only true if you modify the filename.  
If you set the \_DIRECTORY, then the last file in the folder wins in setting the BPMs.

---

<div class="post-metadata">

### Author: ![Sikky](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Sikky](https://community.mp3tag.de/u/Sikky)
#### Post date: [May 2, 2024, 2:24pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/10 "2024-05-02T14:24:48Z")

</div>

Thanks so i will select only one file from each folder

---

<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 2, 2024, 2:26pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/11 "2024-05-02T14:26:00Z")

</div>

You could filter for the first file with  
"$num(%track%,1)" IS 1

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [May 2, 2024, 2:27pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/12 "2024-05-02T14:27:05Z")

</div>

That would still not guarantee that the files inside the 91bmp-folder really contains only tracks with 91 in the BPM tag, right?

---

<div class="post-metadata">

### Author: ![Sikky](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Sikky](https://community.mp3tag.de/u/Sikky)
#### Post date: [May 2, 2024, 2:29pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/13 "2024-05-02T14:29:53Z")

</div>

Yes to me its really just a quick guideline it has not have to be black n white  
Its just with old Reggae Dancehall music - it got digitalized from vinyl  
So sometime from the same "Riddim" you have different slightly bpms

---

<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 2, 2024, 2:30pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/14 "2024-05-02T14:30:15Z")

</div>

> [@LyricsLover](#):
>
> right?

Yes, you are right. As I said: the last one wins. And that could have any value in BPM.  
Taking now only the first file in a folder does not make it any better as that choice does not mean that the ignored rest features the same BPMs.  
I just had a look at an arbitrary folder and that had files ranging from 85 to 145 BPM - and only 2 had the same. That is why I have not added that info to the folder name.

---

<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: [June 1, 2024, 2:30pm UTC](https://community.mp3tag.de/t/adding-bpm-right-after-character/64580/15 "2024-06-01T14:30:39Z")

</div>

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