# Show your file rename format string

**URL:** https://community.mp3tag.de/t/show-your-file-rename-format-string/41758
**Category:** General Discussion
**Created:** [May 22, 2018, 5:52pm UTC](https://community.mp3tag.de/t/show-your-file-rename-format-string/41758 "2018-05-22T17:52:42Z")
**Posts on this page:** 1
**Showing post:** 2

<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 22, 2018, 6:02pm UTC](https://community.mp3tag.de/t/show-your-file-rename-format-string/41758/2 "2018-05-22T18:02:24Z")

</div>

did you know that you can reduce the part

> [@KarlM](#):
>
> `$if(%discnumber%, - CD$left(%discnumber%,1),)`

to [- $num(%discnumber%,1)]  
as the square brackets serve as some kind of if-statement.

Also,

> [@KarlM](#):
>
> $if($stricmp(%artist%,%albumartist%),,%artist% - )

could be shortened to  
$if2(%artist%,%albumartist%)

On the discnumber problem there is e.g. this thread:

> [@Add discnumber with separator only when Discnumber exists](https://community.mp3tag.de/t/add-discnumber-with-separator-only-when-discnumber-exists/14827):
>
> I have run into small issue, I want to use filename formatting as: %discnumber%-$num(%track%,2) - %artist% - %title% It works well untill I have MultiDisc compilation, but if DiscNumber filed is empyt (Single Disc), then it only adds separator. How to avoid that? Basically what I would want to accomplish, would be that separator - after %discnumber% gets only added when Discnumber field actually has something in it. [:rolleyes:]

On the artist or albumartist problem, there is e.g. this thread:

> [@Album-Interpret verwenden, wenn Interpreten unterschiedlich sind](https://community.mp3tag.de/t/album-interpret-verwenden-wenn-interpreten-unterschiedlich-sind/12556):
>
> Hallo zusammen, ich habe ein kleines Problem, aber ich fand leider trotz Recherche keine Lösung. Ich habe meine Musik schon getagged und möchte nun meine Ordnerstruktur wie folgt anlegen: Interpret/Album/Titel Das wäre ja wirklich kein Problem, allerdings habe ich bei den Interpreten sehr oft noch zusätzliche Interpreten mit drin. In diesem Fall soll der Album-Interpret verwendet werden. Leider habe ich auch viele Alben, wo ich der Album-Interpret leer ist, weil keine anderen Künstler vor kam…

---

_[View the full topic](https://community.mp3tag.de/t/show-your-file-rename-format-string/41758)._
