# Script Export

**URL:** <https://community.mp3tag.de/t/script-export/18183>\
**Category:** Support\
**Created:** [August 19, 2016, 6:57am UTC](https://community.mp3tag.de/t/script-export/18183 "2016-08-19T06:57:19Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 19, 2016, 6:57am UTC](https://community.mp3tag.de/t/script-export/18183/1 "2016-08-19T06:57:19Z")

</div>

Sorry for my bad engllish. I have a script to export songs with the same title:

```
$filename(Dupes-Artist Title.m3u8,utf-8)
$loop($lower(%artist% %title%))$loop($lower(%artist% %title%))$loopend()$ifgreater(%_max_counter%,1,'#Same Artist Title: '$if2(%artist% -- %title%,-- empty --)
$loop($lower(%artist% %title%))%_path%
$loopend(),)$loopend()

```

But i want to modify it to get albums with the same name

Can you help me please??  
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:** [August 19, 2016, 7:42am UTC](https://community.mp3tag.de/t/script-export/18183/2 "2016-08-19T07:42:59Z")

</div>

Perhaps something like this:

```
... sorry, does not work

```

edit:  
this should

```
$filename(Dupes-Album.txt,utf-8) $loop(%albumartist%%album%,1)$puts(tmp_album,%album%)$puts(tmp_artist,%albumartist%)
$loop(%album%)$if($and($eql(%album%,$get(tmp_album)),$neql(%albumartist%,$get(tmp_artist))),double: %albumartist% %album%,)$loopend()$loopend()
```

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 19, 2016, 8:00am UTC](https://community.mp3tag.de/t/script-export/18183/3 "2016-08-19T08:00:20Z")

</div>

> [@ohrenkino](#):
>
> Perhaps something like this:
> 
> ```
> ... sorry, does not work
> 
> ```

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 19, 2016, 9:40am UTC](https://community.mp3tag.de/t/script-export/18183/4 "2016-08-19T09:40:25Z")

</div>

Please , any suggestions ? Can anyone help me to find albums with the same 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:** [August 19, 2016, 3:35pm UTC](https://community.mp3tag.de/t/script-export/18183/5 "2016-08-19T15:35:07Z")

</div>

I edited my reply in [Script Export](https://community.mp3tag.de/t/18183/2)  
Please check if this helps you.

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 19, 2016, 8:34pm UTC](https://community.mp3tag.de/t/script-export/18183/6 "2016-08-19T20:34:41Z")

</div>

> [@ohrenkino](#):
>
> I edited my reply in [Script Export](https://community.mp3tag.de/t/18183/2)  
> Please check if this helps you.

Sorry , I have tested and does not work. It generates blank file without results , perhaps along the routes . The structure of my music is in folders:

-Artist

- album

---

<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:** [August 20, 2016, 6:42am UTC](https://community.mp3tag.de/t/script-export/18183/7 "2016-08-20T06:42:28Z")

</div>

> [@pextremera](#):
>
> Sorry , I have tested and does not work. It generates blank file without results , perhaps along the routes . The structure of my music is in folders:
> 
> -Artist
> 
> - album

That you get an empty file can also mean that you do not have duplicate albums.  
The structure of the files does not really matter as the script compares then name of one ALBUMARTIST and ALBUM with the next record but only gives an output if the ALBUM has the same data but the ALBUMARTIST is different. "Greatest Hits" albums are good test cases for such a constellation.

I tested it on a set with  
Earth, Wind & Fire - September  
Earth & Fire - September  
an other tracks and it produced at least one of the "September" albums.

You may now twiddle around with the script: the comparison statement is there, you only have to adapt it to your data.

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 20, 2016, 9:29pm UTC](https://community.mp3tag.de/t/script-export/18183/8 "2016-08-20T21:29:12Z")

</div>

> [@ohrenkino](#):
>
> That you get an empty file can also mean that you do not have duplicate albums.  
> The structure of the files does not really matter as the script compares then name of one ALBUMARTIST and ALBUM with the next record but only gives an output if the ALBUM has the same data but the ALBUMARTIST is different. "Greatest Hits" albums are good test cases for such a constellation.
> 
> I tested it on a set with  
> Earth, Wind & Fire - September  
> Earth & Fire - September  
> an other tracks and it produced at least one of the "September" albums.
> 
> You may now twiddle around with the script: the comparison statement is there, you only have to adapt it to your data.

I think it may be due to the "ALBUMARTIST" label. I'm not sure if I have labeled, although I'm sure to have album of the same name. I'll check when I return trip on monday.  
Until monday I can not check it. 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:** [August 21, 2016, 5:10am UTC](https://community.mp3tag.de/t/script-export/18183/9 "2016-08-21T05:10:10Z")

</div>

> [@pextremera](#):
>
> I think it may be due to the "ALBUMARTIST" label. I'm not sure if I have labeled, although I'm sure to have album of the same name. I'll check when I return trip on monday.  
> Until monday I can not check it. Thanks!

You can easily replace any reference to ALBUMARTIST with ARTIST.  
Yet, properly tagged, ALBUMARTIST is the field to tell who has released the album.

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 21, 2016, 8:25pm UTC](https://community.mp3tag.de/t/script-export/18183/10 "2016-08-21T20:25:02Z")

</div>

> [@ohrenkino](#):
>
> You can easily replace any reference to ALBUMARTIST with ARTIST.  
> Yet, properly tagged, ALBUMARTIST is the field to tell who has released the album.

Hello! I have correctly labeled " ALBUMARTIST " label ( from the beginning of the post) , but I think I did not explain well . What I want is to find the same album names of different artists . For example:

-Janis Joplin

> Greatest Hits

-Eric Clapton

> Greatest Hits

-Dizzy Gillespie

> The Gold Collection

-Django Reinhardt

> The Gold Collection

---

<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:** [August 22, 2016, 3:48pm UTC](https://community.mp3tag.de/t/script-export/18183/11 "2016-08-22T15:48:06Z")

</div>

> [@pextremera](#):
>
> Hello! I have correctly labeled " ALBUMARTIST " label ( from the beginning of the post) , but I think I did not explain well . What I want is to find the same album names of different artists . For example:
> 
> -Janis Joplin
> 
> > Greatest Hits
> 
> -Eric Clapton
> 
> > Greatest Hits
> 
> -Dizzy Gillespie
> 
> > The Gold Collection
> 
> -Django Reinhardt
> 
> > The Gold Collection

This is exactly what my script found in my collection...  
As I said:  
I tested it on a set with  
Earth, Wind & Fire - September  
Earth & Fire - September  
an other tracks and it produced at least one of the "September" albums.

To be honest: any kind of differences in spelling or in the cases will result in the interpretation that an album is a different one... so the script is not very clever.

I would suggest that you sort the albums alphabetically and scan them naturally with your eyes.

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 22, 2016, 8:55pm UTC](https://community.mp3tag.de/t/script-export/18183/12 "2016-08-22T20:55:35Z")

</div>

> [@ohrenkino](#):
>
> This is exactly what my script found in my collection...  
> As I said:  
> I tested it on a set with  
> Earth, Wind & Fire - September  
> Earth & Fire - September  
> an other tracks and it produced at least one of the "September" albums.
> 
> To be honest: any kind of differences in spelling or in the cases will result in the interpretation that an album is a different one... so the script is not very clever.
> 
> I would suggest that you sort the albums alphabetically and scan them naturally with your eyes.

But why it works for you and not for me?  
Are you sure the script is well copied?  
I have different artists with album titles exactly alike  
It should find some match and yet generates me a blank file with line breaks.  
Have you tried to work with completely different artists?  
A visual search many albums would be very tedious

---

<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:** [August 23, 2016, 7:57am UTC](https://community.mp3tag.de/t/script-export/18183/13 "2016-08-23T07:57:42Z")

</div>

> [@pextremera](#):
>
> ...  
> A visual search many albums would be very tedious

Here is another attempt:

```
$filename(Dupes-Album.txt,utf-8) $loop(%album%)$puts(tmp_artist,%albumartist%)$loop(%albumartist%)$if($and($neql(%albumartist%,$get(tmp_artist)),$neql(%_counter%,1)),double: %albumartist%: %album%
,$puts(tmp_artist,%albumartist%))$loopend()$loopend()

```

The linebreak after the comma is intentionally there.

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 23, 2016, 8:44am UTC](https://community.mp3tag.de/t/script-export/18183/14 "2016-08-23T08:44:08Z")

</div>

QUOTE (ohrenkino @ Aug 23 2016, 11:57) \<{POST\_SNAPBACK}\>

Here is another attempt:

```
$filename(Dupes-Album.txt,utf-8) $loop(%album%)$puts(tmp_artist,%albumartist%)$loop(%albumartist%)$if($and($neql(%albumartist%,$get(tmp_artist)),$neql(%_counter%,1)),double: %albumartist%: %album%
,$puts(tmp_artist,%albumartist%))$loopend()$loopend()

```

The linebreak after the comma is intentionally there.

It has now worked, but not quite. He has omitted some matches, I do not understand why. This is the result of a very short list for the tests I'm doing are not too long (only with albums that have the word "collection")

```
(Here has left a blank)double: John Mayall: The Collection
double: Dizzy Gillespie: The Gold Collection CD1
double: Django Reinhardt: The Gold Collection CD1
double: Wynton Marsalis: The Gold Collection CD1
double: Dizzy Gillespie: The Gold Collection CD2
double: Django Reinhardt: The Gold Collection CD2
double: Wynton Marsalis: The Gold Collection CD2

```

He has not found the following:

Bobby McFerrin: The Collection  
Chick Corea: The Gold Collection CD1  
Chick Corea: The Gold Collection CD2

---

<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:** [August 23, 2016, 8:53am UTC](https://community.mp3tag.de/t/script-export/18183/15 "2016-08-23T08:53:06Z")

</div>

> [@pextremera](#):
>
> It has now worked, but not quite. He has omitted some matches, I do not understand why....

Again: it is no script for the most elegant output. It has its limitations.  
You are now free to adapt it to your data and needs.

And quite honest: you would have to look for each of the hits anyway to rename the albums.  
During this process, you will find the "CD2" ones.  
Also, I do not see it as an elegant way to put the CD number into the album name as it is still the same album. DISCNUMBER would be the best field to store the CD number.

---

<div class="post-metadata">

**Author:** ![pextremera](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/f08c70/32.png) [@pextremera](https://community.mp3tag.de/u/pextremera)\
**Post date:** [August 23, 2016, 8:23pm UTC](https://community.mp3tag.de/t/script-export/18183/16 "2016-08-23T20:23:43Z")

</div>

> [@ohrenkino](#):
>
> Again: it is no script for the most elegant output. It has its limitations.  
> You are now free to adapt it to your data and needs.
> 
> And quite honest: you would have to look for each of the hits anyway to rename the albums.  
> During this process, you will find the "CD2" ones.  
> Also, I do not see it as an elegant way to put the CD number into the album name as it is still the same album. DISCNUMBER would be the best field to store the CD number.

I also use the tag "DISCNUMBER" but I'm interested in separate the CD1 of the CD2 because sometimes i want to hear the CD1 but do not want to continue with the CD2 at that time or the other way around. As if they were real disks that came two separate CDs. That way I have ordered my Ipod Classic.

---

<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:26pm UTC](https://community.mp3tag.de/t/script-export/18183/17 "2026-02-09T12:26:23Z")

</div>

Closed on February 9, 2026, 12:26pm UTC


