# Write filename to tag, but only where there is no tag info already

**URL:** <https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268>\
**Category:** Support\
**Created:** [December 20, 2020, 2:01am UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268 "2020-12-20T02:01:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![psychmike](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@psychmike](https://community.mp3tag.de/u/psychmike)\
**Post date:** [December 20, 2020, 2:01am UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268/1 "2020-12-20T02:01:33Z")

</div>

I am trying to figure out how to do a large batch where the file name (artist - title) is written to the tag BUT SKIPPING any tag fields that are already populated (ie. write only empty ones).

Apologies I am a newby, if this is a common question I may not be using the right search terms to find this topic. And I just updated the client and after teaching myself a few simple steps yesterday the update does things pretty differently. Didn't the prior version have a preview function?

..so any help appreciated.

Mike

---

<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:** [December 20, 2020, 8:35am UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268/2 "2020-12-20T08:35:25Z")

</div>

> [@psychmike](#):
>
> yesterday the update does things pretty differently.

Which could these "things" be?  
Anyway: you would have to filter for the missing fields and then update only those.  
On the other hand: if the data in the filenames is better than the tag data (how could that happen?) then import whatever is there and you probably will not see any difference.

> [@psychmike](#):
>
> artist - title

The import of just 2 fields would require only 2 filters - anything more complex with $if() and user-defined fields would require much more effort.

> [@psychmike](#):
>
> Didn't the prior version have a preview function?

Where were you looking for a preview?  
Which version do you use?

---

<div class="post-metadata">

**Author:** ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)\
**Post date:** [December 20, 2020, 3:20pm UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268/3 "2020-12-20T15:20:22Z")

</div>

You could use the action Guess values to write the filename to temporary fields e.g. TEMPARTIST and TEMPTITLE and then use the action Format value:

> Field: ARTIST
> 
> String: $if2(%artist%,%tempartist%)

plus another one for TITLE and then delete the temp tags. All this can be done within an Action group.

---

<div class="post-metadata">

**Author:** ![psychmike](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@psychmike](https://community.mp3tag.de/u/psychmike)\
**Post date:** [December 20, 2020, 6:13pm UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268/4 "2020-12-20T18:13:55Z")

</div>

Thank you folks. I think I am not even at a level to make good use of your comments, I will have to spend more time with the program, and then come back to what you are suggesting. Thank you!

---

<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:** [December 20, 2020, 6:47pm UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268/5 "2020-12-20T18:47:32Z")

</div>

You could try a simple approach:  
Enter as filter  
%artist% MISSING  
(the filter box is at the botton)  
Now you will see all the files that have nothing in the field ARTIST.  
Select the files  
Open Convert\>Filename-Tag, enter as mask:  
%artist% - %dummy%  
This will use only the front bit of the filename and put it into ARTIST  
Now use the filter again, only this time with  
%title% MISSING  
Then open Convert\>Filename-Tag, enter as mask:  
%dummy% - %title%  
and this should fill the TITLE with data from the filename.

---

<div class="post-metadata">

**Author:** ![psychmike](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@psychmike](https://community.mp3tag.de/u/psychmike)\
**Post date:** [December 21, 2020, 4:35pm UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268/6 "2020-12-21T16:35:41Z")

</div>

Thanks Ohrenkino, I hope to report back after I am competent enough with MP3TAG to actually put all this advice to use

---

<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:28pm UTC](https://community.mp3tag.de/t/write-filename-to-tag-but-only-where-there-is-no-tag-info-already/51268/7 "2026-02-09T12:28:59Z")

</div>


