# Why aren't 'placeholders' functions instead?

**URL:** https://community.mp3tag.de/t/why-arent-placeholders-functions-instead/6400
**Category:** General Discussion
**Created:** [March 7, 2008, 12:25am UTC](https://community.mp3tag.de/t/why-arent-placeholders-functions-instead/6400 "2008-03-07T00:25:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [March 7, 2008, 12:25am UTC](https://community.mp3tag.de/t/why-arent-placeholders-functions-instead/6400/1 "2008-03-07T00:25:57Z")

</div>

Maybe a dumb question, but: Why are 'placeholders' not just functions?

In most scripting languages the placeholder variables would be function calls - $file\_size(), $extension(), $bitrate(), for example.

This question occurred to me reading a recent thread about numbering files and getting the total number of files. There doesn't appear to be a 'placeholder' or a scripting function that would be helpful in creating a 'n of m' numbering for a file, and that total can only be entered manually when using the auto-numbering wizard.

May I suggest a function that could be used in scripts that counts the total number of files in the same folder?

Pass in the extension, or maybe use a windows wildcard.

$folder\_filecount("flac")

or

$folder\_filecount("\*.flac")

For the most people this would be the total number of files in an album (or on a disc).

---

<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: [March 7, 2008, 6:21am UTC](https://community.mp3tag.de/t/why-arent-placeholders-functions-instead/6400/2 "2008-03-07T06:21:35Z")

</div>

> [@JJ Johnson](#):
>
> ... Maybe a dumb question, but: Why are 'placeholders' not just functions? ...

Yes, this is a good question. Me too, I think that functions will do work better and more flexible in all scripting jobs I can think of. The stiff and ready made 'placeholders' are relicts from elder times.  
And ... as we see ... the placeholder area of %filename%, %filename\_rel%, ..., to determine the current folder and the parent folder and so on is really unsure to use, functions would be the right choice and more safe.

DD.20080307.0822.CET
