# Copy Winamp Rating to the beginning of Comment

**URL:** https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417
**Category:** Support
**Created:** [August 21, 2011, 3:25pm UTC](https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417 "2011-08-21T15:25:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vivid](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@vivid](https://community.mp3tag.de/u/vivid)
#### Post date: [August 21, 2011, 3:25pm UTC](https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417/1 "2011-08-21T15:25:43Z")

</div>

What I'd like to do is put the rating number at the front of Comment.

Example:

%rating winamp%=5  
%comment%=Good

End result:

%comment%=5\_\_Good

UNLESS there's no rating, in which case it should write 0\_\_

And first of all it should delete the comment part up to the double \_\_ if there is one, since I'd like to update that format in case it's already there.

I'd be using this as an alternative to view ratings from tags in Virtual DJ and I don't want to delete the comments completely because some of them contain useful information.

I'd really like to do it myself but I'm struggling with the script system.

---

<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, 2011, 5:32pm UTC](https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417/2 "2011-08-21T17:32:57Z")

</div>

> [@vivid](#):
>
> What I'd like to do is put the rating number at the front of Comment.
> 
> Example:
> 
> %rating winamp%=5  
> %comment%=Good
> 
> End result:
> 
> %comment%=5\_\_Good

create an action of the type "Format tag field" for the tag comment.  
Enter as format string:  
%rating winamp%\_\_%comment%

This simple action works only once in the intended way - after the first run the comment tag will be extended by the rating and the underscores.  
In my opinion as soon as you merge two fields into one they become one. So you have to take care e.g. by filtering to treat only those tracks that have to be treated.  
Although I am sure that there are some regex nerds that can think of something rather complicated.

---

<div class="post-metadata">

### Author: ![vivid](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@vivid](https://community.mp3tag.de/u/vivid)
#### Post date: [August 21, 2011, 7:54pm UTC](https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417/3 "2011-08-21T19:54:07Z")

</div>

> [@ohrenkino](#):
>
> create an action of the type "Format tag field" for the tag comment.  
> Enter as format string:  
> %rating winamp%\_\_%comment%
> 
> This simple action works only once in the intended way - after the first run the comment tag will be extended by the rating and the underscores.  
> In my opinion as soon as you merge two fields into one they become one. So you have to take care e.g. by filtering to treat only those tracks that have to be treated.  
> Although I am sure that there are some regex nerds that can think of something rather complicated.

Thanks a lot, it works. Would you know how to delete a string of a number and 2 underscores (if found) in the first 3 positions in the comment field? I'd like to add that at the beginning of the script.

---

<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, 2011, 3:47am UTC](https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417/4 "2011-08-22T03:47:27Z")

</div>

> [@vivid](#):
>
> Thanks a lot, it works. Would you know how to delete a string of a number and 2 underscores (if found) in the first 3 positions in the comment field? I'd like to add that at the beginning of the script.

more than one way lead to Rome ...  
Either you cut the "middle" part with an action of the type "format tag field" and the expression  
$mid(%comment%,4,$len(%comment%))

Or you replace (create an action of that type for regular expressions) anything in front of the underscores with nothing:  
Search: `(.*__)(.*)`  
Replace $2

---

<div class="post-metadata">

### Author: ![vivid](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@vivid](https://community.mp3tag.de/u/vivid)
#### Post date: [August 22, 2011, 9:41am UTC](https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417/5 "2011-08-22T09:41:17Z")

</div>

> [@ohrenkino](#):
>
> more than one way lead to Rome ...  
> Either you cut the "middle" part with an action of the type "format tag field" and the expression  
> $mid(%comment%,4,$len(%comment%))
> 
> Or you replace (create an action of that type for regular expressions) anything in front of the underscores with nothing:  
> Search: (._\_\_)(._)  
> Replace $2

Thanks, just what I wanted. Great!

---

<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: [April 4, 2024, 6:29am UTC](https://community.mp3tag.de/t/copy-winamp-rating-to-the-beginning-of-comment/12417/6 "2024-04-04T06:29:36Z")

</div>

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