# Conversion of a bunch of similar filenames

**URL:** https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275
**Category:** Support
**Created:** [October 16, 2024, 10:14am UTC](https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275 "2024-10-16T10:14:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [October 16, 2024, 10:14am UTC](https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275/1 "2024-10-16T10:14:23Z")

</div>

Among other things, I have an MP3 collection of 211 files without tags.  
I would like to generate basic information from the file names.  
However, these are slightly different in their structure.  
I have searched in vain for a way to pre-sort them.  
Who has a suitable idea for editing them using Guess-Values?

[Dateiliste.txt](https://community.mp3tag.de/uploads/short-url/2yhi89zfcMdyKz63MdlZUBPIrGt.txt) (20.5 KB)

---

<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: [October 16, 2024, 11:41am UTC](https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275/2 "2024-10-16T11:41:05Z")

</div>

You could filter for files with a given number of hyphens and then treat these (with a common structure) in 1 go. And then filter for the next number and treat those.

This would be a suggestion for such a filter:  
`"$add($len($regexp(%_filename%,'[^-]',)),1)" IS 5`

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [October 16, 2024, 3:32pm UTC](https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275/3 "2024-10-16T15:32:28Z")

</div>

Wow! 😃  
It worked.  
I tried to understand the tricky filter expression, but failed again.

Many thanks to regex guru. 🤗

---

<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: [October 16, 2024, 3:47pm UTC](https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275/4 "2024-10-16T15:47:44Z")

</div>

The regular expression removes anything that is not a hyphen from the given string (here: Filename) and then checks the length of the leftover

`$add($len($regexp('24 - Bobby Fuller - D - CBS - 2639 - B - You Kiss Me.mp3','[^-]',)),1)`  
returns 7  
`$add($len($regexp('03 - Blossom Toes - D - Polydor 59180 - A - Ill Be Your Baby Tonight.mp3','[^-]',)),1)`  
returns 6

---

<div class="post-metadata">

### Author: ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)
#### Post date: [October 16, 2024, 4:00pm UTC](https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275/5 "2024-10-16T16:00:04Z")

</div>

I've got it.  
I searched in vain for a way to count the hyphens using a function.  
You made my day! 🙂

---

<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: [November 15, 2024, 4:00pm UTC](https://community.mp3tag.de/t/conversion-of-a-bunch-of-similar-filenames/66275/6 "2024-11-15T16:00:47Z")

</div>

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