# Filename - Tag, condition if field is missing

**URL:** <https://community.mp3tag.de/t/filename-tag-condition-if-field-is-missing/62813>\
**Category:** Support\
**Created:** [November 20, 2023, 4:08pm UTC](https://community.mp3tag.de/t/filename-tag-condition-if-field-is-missing/62813 "2023-11-20T16:08:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![licur2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/9dc877/32.png) [@licur2](https://community.mp3tag.de/u/licur2)\
**Post date:** [November 20, 2023, 4:08pm UTC](https://community.mp3tag.de/t/filename-tag-condition-if-field-is-missing/62813/1 "2023-11-20T16:08:13Z")

</div>

I want to use Filename - Tag to bulk add tags from my Folder names.

I have two types of folders:  
`\%year%.%month%.%day% [%comment%] %album% [%event%]\%dummy%`  
for example: \1111.11.11 [ABCD-1234] album [XYZ]\filename...  
`\%year%.%month%.%day% %album% [%event%]\%dummy%`  
for example: \1111.11.11 album [XYZ]\filename...

They work in isolation but the issue is I cant get mp3tag to do both in one Format string, I have tried:  
`%year%.%month%.%day%$if2([%comment%],) %album% [%EVENT%]\%dummy%`  
but it doesn't show anything on the preview.  
is $if2 not possible here? what would be best way to do that?

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [November 20, 2023, 4:12pm UTC](https://community.mp3tag.de/t/filename-tag-condition-if-field-is-missing/62813/2 "2023-11-20T16:12:20Z")

</div>

> [@licur2](#):
>
> what would be best way to do that?

Filter F3 for the folders matching the first type and apply Filename -\> Tag.  
Then Filter again for your second type and apply Filename -\> Tag for only this part of your collection.

---

<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 20, 2023, 4:12pm UTC](https://community.mp3tag.de/t/filename-tag-condition-if-field-is-missing/62813/3 "2023-12-20T16:12:26Z")

</div>

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