# length tag in the filename

**URL:** https://community.mp3tag.de/t/length-tag-in-the-filename/6657
**Category:** Support
**Created:** [April 18, 2008, 5:02pm UTC](https://community.mp3tag.de/t/length-tag-in-the-filename/6657 "2008-04-18T17:02:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pavlos](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/ac8455/32.png) [@pavlos](https://community.mp3tag.de/u/pavlos)
#### Post date: [April 18, 2008, 5:02pm UTC](https://community.mp3tag.de/t/length-tag-in-the-filename/6657/1 "2008-04-18T17:02:02Z")

</div>

Hi,

Can someone please tell me what's the format string to use in the Tag-Filename window in order to get printed the length of the wma file after the filename. For instance:

the file A.wma which has a length of 20 seconds would became A 000020.wma  
the file B.wma which has a length of 41:28 would became A 004128.wma

we always need to have 6 digits for the time field.

Regards,  
pavlos

---

<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: [April 18, 2008, 5:40pm UTC](https://community.mp3tag.de/t/length-tag-in-the-filename/6657/2 "2008-04-18T17:40:28Z")

</div>

> [@pavlos](#):
>
> ... what's the format string to use in the Tag-Filename window in order to get printed the length of the wma file after the filename. For instance:  
> the file A.wma which has a length of 20 seconds would became A 000020.wma  
> the file B.wma which has a length of 41:28 would became A 004128.wma  
> we always need to have 6 digits for the time field. ...

This should work:  
$right(00$replace(%_length%,_,),6)

DD.20080418.2140.CEST

---

<div class="post-metadata">

### Author: ![pavlos](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/ac8455/32.png) [@pavlos](https://community.mp3tag.de/u/pavlos)
#### Post date: [April 18, 2008, 6:22pm UTC](https://community.mp3tag.de/t/length-tag-in-the-filename/6657/3 "2008-04-18T18:22:55Z")

</div>

It works! Thank you very much DetlevD!!

---

<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:20pm UTC](https://community.mp3tag.de/t/length-tag-in-the-filename/6657/4 "2026-02-09T12:20:54Z")

</div>


