# Shorten Filename Title with script

**URL:** https://community.mp3tag.de/t/shorten-filename-title-with-script/7166
**Category:** Support
**Created:** [September 8, 2008, 3:41am UTC](https://community.mp3tag.de/t/shorten-filename-title-with-script/7166 "2008-09-08T03:41:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Oblio](https://community.mp3tag.de/user_avatar/community.mp3tag.de/oblio/32/4828_2.png) [@Oblio](https://community.mp3tag.de/u/Oblio)
#### Post date: [September 8, 2008, 3:41am UTC](https://community.mp3tag.de/t/shorten-filename-title-with-script/7166/1 "2008-09-08T03:41:06Z")

</div>

I want to shorten long filenames to 64 characters by reducing the length of the title only e.g.

01 - This Track Has A Very, Very, Very, Very Long Title - Abba - The Best Of Abba.mp3  
to  
01 - This Track Has A Very, Very, - Abba - The Best Of Abba.mp3

Using Convert Filename - Filename I got this far:

%1 - $iflonger(%\_filename\_ext%,64, ????? ,%2) - %3 - %4

any help appreciated.

P.S. I don't want to rely on tag data at all.

---

<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: [September 8, 2008, 5:59am UTC](https://community.mp3tag.de/t/shorten-filename-title-with-script/7166/2 "2008-09-08T05:59:00Z")

</div>

> [@Oblio](#):
>
> I want to shorten long filenames to 64 characters by reducing the length of the title only ...

You may try:  
**%1 - $left(%2,$ifgreater($len(%1 - %2 - %3 - %4),60,$sub($len(%2),$sub($len(%1 - %2 - %3 - %4),60)),$len(%2))) - %3 - %4**

This will result into a 64 character string:  
"01 - This Track Has A Very, Very, - Abba - The Best Of Abba.mp3"

It seem that Mp3tag system placeholders like "%\_filename\_ext%" are not supported in converter filename-filename. I would suggest to use an action otherwise.

DD.20080908.1003.CEST

---

<div class="post-metadata">

### Author: ![Oblio](https://community.mp3tag.de/user_avatar/community.mp3tag.de/oblio/32/4828_2.png) [@Oblio](https://community.mp3tag.de/u/Oblio)
#### Post date: [September 12, 2008, 1:11am UTC](https://community.mp3tag.de/t/shorten-filename-title-with-script/7166/3 "2008-09-12T01:11:51Z")

</div>

Thanks DetlevD you rescued me again!

This works perfectly, as usual. 😃

> [@DetlevD](#):
>
> You may try:  
> **%1 - $left(%2,$ifgreater($len(%1 - %2 - %3 - %4),60,$sub($len(%2),$sub($len(%1 - %2 - %3 - %4),60)),$len(%2))) - %3 - %4**
> 
> This will result into a 64 character string:  
> "01 - This Track Has A Very, Very, - Abba - The Best Of Abba.mp3"
> 
> It seem that Mp3tag system placeholders like "%\_filename\_ext%" are not supported in converter filename-filename. I would suggest to use an action otherwise.
> 
> DD.20080908.1003.CEST

---

<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:21pm UTC](https://community.mp3tag.de/t/shorten-filename-title-with-script/7166/4 "2026-02-09T12:21:05Z")

</div>


