# Adding text to beginning of existing comment

**URL:** https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026
**Category:** Support
**Created:** [November 10, 2022, 8:30pm UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026 "2022-11-10T20:30:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Grey](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/b782af/32.png) [@Grey](https://community.mp3tag.de/u/Grey)
#### Post date: [November 10, 2022, 8:30pm UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026/1 "2022-11-10T20:30:23Z")

</div>

I'd like to create an action that would add specific text to the beginning of the comment field and leave whatever is already there.

For example. If the field already said, "Vinyl". I'd like it changed to "NMR, Vinyl".

Bonus if it could skip the comma when the field is empty, but I'm doubtful that's possible.

Can any of this be done?

---

<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: [November 10, 2022, 8:35pm UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026/2 "2022-11-10T20:35:04Z")

</div>

See the FAQs:

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967/5):
>
> How to append the string " xyz" to the content of a tag field? Create a [new action](https://community.mp3tag.de/t/actions/967/2) in an existing action group and choose Format value as action type. Field specifies the tag field the formatting rule should be applied to. Format string must have the field placeholder for the field selected above and the string which should be appended. Example: If you want to append the string " xyz" to the current value of the comment field: Action type: Format value Field: COMMENT Format string: %com…

And to limit the files to those that really need treatment, use a filter:  
%comment% HAS Vinyl

---

<div class="post-metadata">

### Author: ![Grey](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/b782af/32.png) [@Grey](https://community.mp3tag.de/u/Grey)
#### Post date: [November 11, 2022, 1:53am UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026/3 "2022-11-11T01:53:45Z")

</div>

Thank you. This works.

I'll have to solve the comma issue by doing this in two steps. This method for files that already have comments, then another to tag the ones that are blank.

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [November 11, 2022, 5:47am UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026/4 "2022-11-11T05:47:04Z")

</div>

Use this format string:  
`[NMR, %comment%]`

The square brackets are responsable for only writing the format string if the placeholder has content.

> **[Format Strings and Placeholders – Mp3tag Documentation](https://docs.mp3tag.de/format/)**
>
> Documentation on format strings and placeholders to describe the structure of file names and imported data. Mp3tag is the universal Tag Editor.

---

<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: [November 11, 2022, 6:14am UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026/5 "2022-11-11T06:14:08Z")

</div>

Nice idea, @poster.

> [@poster](#):
>
> Use this format string:  
> `[NMR, %comment%]`

If you use  
`NMR[, %comment%]`  
then you keep the existing contents of comment with an added comma but insert NMR every time in just one go

---

<div class="post-metadata">

### Author: ![Grey](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/b782af/32.png) [@Grey](https://community.mp3tag.de/u/Grey)
#### Post date: [November 11, 2022, 5:16pm UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026/6 "2022-11-11T17:16:01Z")

</div>

Nice. Thank you.

Now I can tag them all at once.

---

<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: [December 11, 2022, 5:16pm UTC](https://community.mp3tag.de/t/adding-text-to-beginning-of-existing-comment/59026/7 "2022-12-11T17:16:51Z")

</div>

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