# filter for mp3’s that have more than one album name in the same folder?

**URL:** https://community.mp3tag.de/t/filter-for-mp3-s-that-have-more-than-one-album-name-in-the-same-folder/12962
**Category:** Support
**Created:** [January 19, 2012, 10:17am UTC](https://community.mp3tag.de/t/filter-for-mp3-s-that-have-more-than-one-album-name-in-the-same-folder/12962 "2012-01-19T10:17:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bobbydriver](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@bobbydriver](https://community.mp3tag.de/u/bobbydriver)
#### Post date: [January 19, 2012, 10:17am UTC](https://community.mp3tag.de/t/filter-for-mp3-s-that-have-more-than-one-album-name-in-the-same-folder/12962/1 "2012-01-19T10:17:57Z")

</div>

Slightly obscure question I know but is there anyway I can script or filter for mp3’s that have more than one album name in the same folder?

My folder structure is

%Genre%\%artist%\%year% %album%\%track% - %title%

I seem to have a few stray albums folder where the album tag is inconsistent across the mp3s. With about 50,000 mp3s it gets hard to spot them all manually

I can’t figure out how to do it. Maybe that is because it’s impossible but worth asking you clever lot!

---

<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: [January 19, 2012, 10:56am UTC](https://community.mp3tag.de/t/filter-for-mp3-s-that-have-more-than-one-album-name-in-the-same-folder/12962/2 "2012-01-19T10:56:19Z")

</div>

I doubt that you can do it within MP3tag as a) the filetype is not Mp3tag's domain and 🕶 MP3tag only looks at the current file but does not compare successive ones.

What you could do is to dump a list of filenames in a text-file and then check this text-file e.g. with Excel.  
Open a command shell and navigate to the top folder of your music library  
enter the command

dir \*.jpg /b /s \> covers.txt  
Open the textfile in e.g. Excel, separate the filenames from the path and then enter a formula like  
if(a1;b1;0;1)  
and filter for the 1s.

---

<div class="post-metadata">

### Author: ![bobbydriver](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@bobbydriver](https://community.mp3tag.de/u/bobbydriver)
#### Post date: [January 19, 2012, 12:39pm UTC](https://community.mp3tag.de/t/filter-for-mp3-s-that-have-more-than-one-album-name-in-the-same-folder/12962/3 "2012-01-19T12:39:04Z")

</div>

> [@ohrenkino](#):
>
> I doubt that you can do it within MP3tag as a) the filetype is not Mp3tag's domain and 🕶 MP3tag only looks at the current file but does not compare successive ones.
> 
> What you could do is to dump a list of filenames in a text-file and then check this text-file e.g. with Excel.  
> Open a command shell and navigate to the top folder of your music library  
> enter the command
> 
> dir \*.jpg /b /s \> covers.txt  
> Open the textfile in e.g. Excel, separate the filenames from the path and then enter a formula like  
> if(a1;b1;0;1)  
> and filter for the 1s.

You’ve put me along the right lines. I can export the folder name and the album tag (using the export facility) and then load them into a database and use SQL to identify the offending tags.

Thanks

---

<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: [January 19, 2012, 6:24pm UTC](https://community.mp3tag.de/t/filter-for-mp3-s-that-have-more-than-one-album-name-in-the-same-folder/12962/4 "2012-01-19T18:24:13Z")

</div>

> [@bobbydriver](#):
>
> Slightly obscure question I know but is there anyway I can script or filter for mp3’s that have more than one album name in the same folder? ...

Maybe this export script can help ...

$filename($getEnv('USERPROFILE')'\Desktop\AlbumDiff.txt',UTF-8)  
$loop(%\_folderpath%,1)$loop(%ALBUM%,1)%\_folderpath%' === '%ALBUM%  
$loopend()$loopend()

DD.20120119.2025.CET

Possibly this report is a little bit more comfortable to read ...

**1: $filename($getEnv('USERPROFILE')'\Desktop\AlbumDiff.txt',UTF-8)** 

**2: $loop(0)$loop(%\_folderpath%,1)$puts(MaxWidth1,$ifgreater($len(%\_folderpath%),$get(MaxWidth1),$len(%\_folderpath%),$get(MaxWidth1)))$loopend()  
3: $loop(%\_folderpath%,1)$loop(%ALBUM%,1)$left(%\_folderpath%$repeat($char(32),$get(MaxWidth1)),$get(MaxWidth1))' ==\> '%ALBUM%  
4: $loopend()$loopend()$repeat('=',$get(MaxWidth1))$loopend()  
5: $loop(0)$loop(%ALBUM%,1)$puts(MaxWidth2,$ifgreater($len(%ALBUM%),$get(MaxWidth2),$len(%ALBUM%),$get(MaxWidth2)))$loopend()  
6: $loop(%ALBUM%,1)$loop(%\_folderpath%,1)$left(%ALBUM%$repeat($char(32),$get(MaxWidth2)),$get(MaxWidth2))' ==\> '%\_folderpath%  
7: $loopend()$loopend()$repeat('=',$get(MaxWidth2))$loopend()**

 

DD.20110120.0640.CET

---

<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:23pm UTC](https://community.mp3tag.de/t/filter-for-mp3-s-that-have-more-than-one-album-name-in-the-same-folder/12962/5 "2026-02-09T12:23:35Z")

</div>


