# Batch replacing empty (NULL) comments field

**URL:** https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940
**Category:** Support
**Created:** [September 29, 2012, 6:41am UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940 "2012-09-29T06:41:44Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![trevoraiston](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@trevoraiston](https://community.mp3tag.de/u/trevoraiston)
#### Post date: [September 29, 2012, 6:41am UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/1 "2012-09-29T06:41:44Z")

</div>

I want to batch replace empty (null) comments fields with a text string describing my library .But if after selecting my files, in replace i leave the original field blank or use empty quotes ("") and put my string in replace id does not work. Is there a specific character/string to represent empty fields.

TIA

Trevor

---

<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: [September 29, 2012, 7:14am UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/2 "2012-09-29T07:14:27Z")

</div>

A Null-field ist not there, so there is nowhere to replace something in.  
Instead you could simply select all the tracks with empty comments, enter the comment string in the tag panel and press Ctrl-S or the disk symbol in the tool bar.

Or you could write an action of the type "Format tag field".

---

<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: [September 29, 2012, 9:10am UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/3 "2012-09-29T09:10:03Z")

</div>

> [@Trevor](#):
>
> ... Is there a specific character/string to represent empty fields. ...

You can format a tag-field with the value **$char(0)** which creates a null string, so it will cause the target tag-field to be removed.

DD.20120929.1308.CEST, DD.20150306.1904.CET

---

<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: [September 29, 2012, 10:00am UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/4 "2012-09-29T10:00:46Z")

</div>

Edit: I think I understood the problem wrong.

---

<div class="post-metadata">

### Author: ![trevoraiston](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@trevoraiston](https://community.mp3tag.de/u/trevoraiston)
#### Post date: [September 29, 2012, 11:10am UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/5 "2012-09-29T11:10:14Z")

</div>

Thanks to all for replying. But I did leave the field blank and it did not work. I'll give it another go later.

Trevor

---

<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: [September 29, 2012, 11:32am UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/6 "2012-09-29T11:32:00Z")

</div>

To check if a tag value is empty use  
$if(%comment%,yes, no)

For your purpose you can use:

Action Format value  
Field: COMMENT  
Format string: $if2(%comment%,My string if comment is empty)

It reads: If comment tag present, keep it. Else add my string.

---

<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: [September 29, 2012, 3:18pm UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/7 "2012-09-29T15:18:36Z")

</div>

> [@Trevor](#):
>
> ... i leave the original field blank or use empty quotes ("") ...

In Mp3tag this character seqence ... **""**... is not an empty string, but a string of two quote characters.  
In Mp3tag a string is delimited by a pair of single apostroph characters, e. g. ...

**'This is a string.'**

In MP3tag you cannot create an empty string by writing two apostrophes side by side ... **''**... because the apostrophe is a special character and two apostrophes side by side will result into one apostroph.

DD.20120929.1916.CEST

---

<div class="post-metadata">

### Author: ![trevoraiston](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@trevoraiston](https://community.mp3tag.de/u/trevoraiston)
#### Post date: [September 29, 2012, 4:03pm UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/8 "2012-09-29T16:03:02Z")

</div>

> [@DetlevD](#):
>
> In Mp3tag this character seqence ... **""**... is not an empty string, but a string of two quote characters.  
> In Mp3tag a string is delimited by a pair of single apostroph characters, e. g. ...
> 
> **'This is a string.'**
> 
> In MP3tag you cannot create an empty string by writing two apostrophes side by side ... **''**... because the apostrophe is a special character and two apostrophes side by side will result into one apostroph.
> 
> DD.20120929.1916.CEST

Thank for the info 🙂

Trevor

---

<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:24pm UTC](https://community.mp3tag.de/t/batch-replacing-empty-null-comments-field/13940/9 "2026-02-09T12:24:05Z")

</div>


