# Create filename with conditional parts

**URL:** https://community.mp3tag.de/t/create-filename-with-conditional-parts/57345
**Category:** Support
**Created:** [May 19, 2022, 8:36am UTC](https://community.mp3tag.de/t/create-filename-with-conditional-parts/57345 "2022-05-19T08:36:30Z")
**Posts on this page:** 1
**Showing post:** 6

<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: [May 19, 2022, 8:51am UTC](https://community.mp3tag.de/t/create-filename-with-conditional-parts/57345/6 "2022-05-19T08:51:32Z")

</div>

I don't know if you will find something for MEDIATYPE for all files ...  
So, if you do not want to get something like  
"Europe - The Final Countdown - 1986 - ()"  
Then I would suggest that you modify

> [@How do I make a field from a tag source](https://community.mp3tag.de/t/how-do-i-make-a-field-from-a-tag-source/57341/9):
>
> Format string:  
> `%ALBUMARTIST% - %ALBUM% - %YEAR% - (%MEDIATYPE%)`

to  
`%ALBUMARTIST% - %ALBUM% - %YEAR%[- (%MEDIATYPE%)]`  
the square brackets work like an if-condition

---

_[View the full topic](https://community.mp3tag.de/t/create-filename-with-conditional-parts/57345)._
