# customizing the discogs script

**URL:** https://community.mp3tag.de/t/customizing-the-discogs-script/9089
**Category:** Web Sources Discussion
**Created:** [October 5, 2009, 7:43am UTC](https://community.mp3tag.de/t/customizing-the-discogs-script/9089 "2009-10-05T07:43:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tagwerk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@tagwerk](https://community.mp3tag.de/u/tagwerk)
#### Post date: [October 5, 2009, 7:43am UTC](https://community.mp3tag.de/t/customizing-the-discogs-script/9089/1 "2009-10-05T07:43:18Z")

</div>

hi,

I want to customizing the discogs script but have no real scripting experience, so I would be really thankful if someone could help me out here.

I would like to put the "Label" info from the discogs website in the "Composer" tag and the "Catalog#" in the "Comment" tag.

There other thing i was wondering about: is it possible to use the discogs script and the information from the website to rename folders, for example:  
[Catalog#] Artist - Album (Year)  
[CAT 173 CD] AFX - Chosen Lords (2006)

I guess those are really newbie questions but it would be great if someone could help me out here.

Many Thanks in advance, tagwerk

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [October 5, 2009, 12:01pm UTC](https://community.mp3tag.de/t/customizing-the-discogs-script/9089/2 "2009-10-05T12:01:54Z")

</div>

You just have to change e.g.  
_outputto "Discogs\_Catalog"_  
to  
_outputto "Comment"_

Rename folder by tag:  
[/t/8037/1](https://community.mp3tag.de/t/8037/1)

---

<div class="post-metadata">

### Author: ![tagwerk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@tagwerk](https://community.mp3tag.de/u/tagwerk)
#### Post date: [October 6, 2009, 6:43am UTC](https://community.mp3tag.de/t/customizing-the-discogs-script/9089/3 "2009-10-06T06:43:38Z")

</div>

thank you very much for your quick help.  
it all worked out perfectly except for one thing:  
when i try renaming the folders with the following format:

[%comment%] %artist% - %album% (%year%)

it leaves out the brackets so that instead of:  
[CAT 173 CD] AFX - Chosen Lords (2006)

I just get:  
CAT 173 CD AFX - Chosen Lords (2006)

Is there any way to fix this or am I just missing something?!  
Thanks again.

---

<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: [October 6, 2009, 7:05am UTC](https://community.mp3tag.de/t/customizing-the-discogs-script/9089/4 "2009-10-06T07:05:20Z")

</div>

> [@tagwerk](#):
>
> ... when i try renaming the folders with the following format: [%comment%] %artist% - %album% (%year%)  
> it leaves out the brackets so that instead of:  
> [CAT 173 CD] AFX - Chosen Lords (2006)  
> I just get:  
> CAT 173 CD AFX - Chosen Lords (2006)  
> Is there any way to fix this or am I just missing something?! ...

Maybe you've missed reading the Mp3tag help files in deep.  
Read section "Characters with special functionality" at end of the page: [https://docs.mp3tag.de/scripting](https://docs.mp3tag.de/scripting)

If the COMMENT tag field is empty and using the above format string, then you will get a result string of " CD AFX - Chosen Lords (2006)"  
To suppress a leading white space youe should better code the format string [%comment%]%artist% - %album% (%year%)  
If you want to have square bracket in all cases around the content of the COMMENT tag field, then you have to _escape_ the special meaning of reserved characters in the Mp3tag scripting language.  
You have to put the single quote around the reserved characters if you want to use them unparsed.

```
'['%comment%']' %artist% - %album% (%year%)

```

It is also possible to _escape_ the complete format string in one step.

```
'[%comment%] %artist% - %album% (%year%)'

```

DD.20091006.1104.CEST
