# Shorten filenames for burning software

**URL:** <https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821>\
**Category:** Off-Topic\
**Created:** [March 9, 2019, 6:33pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821 "2019-03-09T18:33:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [March 9, 2019, 6:33pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821/1 "2019-03-09T18:33:35Z")

</div>

Would it be possible for Mp3tag to see if the path and filename added together exceed a certain number?

So that my burning software does not truncate me the filenames as it wishes, but it would me making a conscience choice long time before I will start to secure them on an optical disc?

---

<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:** [March 9, 2019, 6:47pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821/2 "2019-03-09T18:47:09Z")

</div>

> [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/3):
>
> Would it be possible for Mp3tag to see

What do you mean by "see"?  
You can use a filter for find those files:  
`"$ifgreater($len(%_filename%),64,yes,no)" IS yes`  
and naturally you can create a column with the expression for value  
`$len(%_filename%)`

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [March 9, 2019, 7:39pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821/3 "2019-03-09T19:39:54Z")

</div>

> [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/4):
>
> > [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/3):
> >
> > Would it be possible for Mp3tag to see  
> > [...]
> 
> What do you mean by "see"?  
> [...]

To spit out some kind of info. Like when I am using my current code in Columns

`$iflonger(%_FILENAME%,122,'TOO LONG','+ OK +')`  
` `  
Unfortunately neither mine or what you are proposing does not take into consideration the lenght of the folder in which the file resides. Or to be more precise: the length of the whole path which leads to the file

Only after using something like

`$iflonger(%_PATH%),122,'TOO LONG','+ OK +'`

or

` `$ifgreater($len(%_PATH%),122,'TOO LONG','+ OK +')`

Mp3tag sees and tells me what I need to know

---

<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:** [March 10, 2019, 1:19pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821/4 "2019-03-10T13:19:36Z")

</div>

> [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/3):
>
> I will start to secure them on an optical disc

Do you really need the full path and not just a relative one?  
And as this is not clear but MP3tag offers you all the scripting functions, filters and actions, it should be easy to get the right filenames.  
If you get truncated file names, you could consider to use a joliet filesystem that allows longer names.

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [March 11, 2019, 12:46pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821/5 "2019-03-11T12:46:16Z")

</div>

> [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/6):
>
> Do you really need the full path and not just a relative one?  
> [...]

I already moved a long time ago have all of my music to drive M. And named my folders on it like `M` or `Mus` instead `New Music` or `Archive`

It is the long artist names that are the problem; followed by long remix titles and additional names that I put into TITLEs [thus FILENAMEs] and more than one track kept together in one file. The first one and that last issue are unsolvable- unless I decide to stop caring what is in FILENAMEs [thus relying solely on TITLEs] and use stop using file managers to navigate my folders

> [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/6):
>
> If you get truncated file names, you could consider to use a joliet filesystem that allows longer names.

I will look into that the next time I will do the burning

---

<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:** [March 11, 2019, 12:52pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821/6 "2019-03-11T12:52:22Z")

</div>

> [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/7):
>
> unless I decide to stop caring what is in FILENAMEs

why so absolute?  
It should be possible to cut each of the elements (artist, title, album) to a reasonable size. And if you have an untruncated number somewhere in the filename, then the filename stays most likely unique - which is the only rigid property of a filename.  
So instead of relying on a probably rather insensitive algorithm of the burning program, you have all the functions to get it done properly.  
You can even create a user-defined field in which you store the future filename so that you have full control over it. Then use this field to create the (shortened) filename.

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [March 11, 2019, 1:05pm UTC](https://community.mp3tag.de/t/shorten-filenames-for-burning-software/44821/7 "2019-03-11T13:05:56Z")

</div>

> [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/8):
>
> > [@How to limit number of characters using actions](https://community.mp3tag.de/t/how-to-limit-number-of-characters-using-actions/44449/7):
> >
> > unless I decide to stop caring what is in FILENAMEs
> 
> why so absolute?  
> [...]  
> You can even create a user-defined field in which you store the future filename so that you have full control over it. Then use this field to create the (shortened) filename.

A long time ago I was thinning about implementing such system; of having actions generate FILENAMEs based on data from other tag fields

Very soon my sketch of the system became a pyramid of rules. So I decided to stick to the old rule of TITLE = FILENAME [with illegal character being replaced by actions] and simply cut off he ends of FILENAMEs. And as my usage of my other actions / rules showed with time, that was a good choice- because I have way enough things to remember when adjusting the current system [action] that need to be taken care off, so that the system do not falls apart [i.e. generating with time more and more errors and data loss]. So one more pyramid of rules would be a too much of weight to carry on
