Appending Length Field to Filename


I'm trying to append the Length of a track to the end of the file name in minutes and seconds.

I am creating a Format Value action with the field _FILENAME and the Format string
%_filename% (%_length%)

This does the job , but mysteriously removes the colon separator which is between the minutes and seconds in the Length field. I don't know why this should be. This squashes the minutes and seconds together , making it useless. Can anyone help , as i can't seem to fix it?

Instead of Filename (Mins:Secs) , I getting Filename (Minssecs).

Any ideas?

Grateful for any help.


The colon is not allowed to be used inside of filenames.

To fix this, you can use the $replace function: %_filename% ($replace(%_length%,:,-))

Hi Florian

Ok thanks for that. I'm grateful for your help.

I built it into an Action , and it's working perfectly first time..

Thanks. much appreciated.


I know that this is an old topic, but here is some scripting that might make the display of the song length in a filename a little more palatable.

I use the following script to display the length of the song as if less than 10 minutes, and as otherwise.


00_42 will show as 0.42
05_05 will show as 5.05
13_21 will show as 13.21

This seems to work pretty well for me as a part of my Tag - Filename conversions, this helped to replace an additional Filename - Filename conversion that I ran to change the %_length% delimiter to a period and remove the leading zero for songs that were less than 10 minutes. Otherwise, I would just manually change the underscore for songs greater than 10 minutes.