# Copy TLEN to Length

**URL:** https://community.mp3tag.de/t/copy-tlen-to-length/63900
**Category:** Support
**Created:** [February 25, 2024, 1:40pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900 "2024-02-25T13:40:08Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Beat](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@Beat](https://community.mp3tag.de/u/Beat)
#### Post date: [February 25, 2024, 1:40pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/1 "2024-02-25T13:40:08Z")

</div>

I found this very old thread, not sure whether someone still will see my question:

I would like to copy the **Song Length** from the MP3 file to the **TLEN** tag for my MP3 collection. Is this possible to do with MP3Tag?  
There should be the possibility to get the information and copy it to the TLEN tag using a script or macro. Did someone already tried such options?  
Thanks.

---

<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: [February 25, 2024, 1:53pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/2 "2024-02-25T13:53:30Z")

</div>

here is a thread from the FAQs about the general procedure.  
In your case it would be the field LENGTH and  
Format string: %\_length%

Please note that if you change the length of the song with an audio editor that this will not be relfected in the field LENGTH but only in the property \_LENGTH.

---

<div class="post-metadata">

### Author: ![Beat](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@Beat](https://community.mp3tag.de/u/Beat)
#### Post date: [February 25, 2024, 2:20pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/3 "2024-02-25T14:20:59Z")

</div>

Thanks a lot, I already could indicate the real duration into milliseconds using the formula  
$if2(%length%,$mul(%\_length\_seconds%,1000))  
But how do I copy the content of real length (\_Length) to the TLEN tag (Length) ?

 ![image](https://community.mp3tag.de/uploads/default/original/3X/d/9/d91c1b381227ba301e7b70cf793529bb6ca049dd.png)

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [February 25, 2024, 2:26pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/4 "2024-02-25T14:26:42Z")

</div>

If you use %\_LENGTH% as mentioned by @ohrenkino, the content will automatically be saved in TLEN (at least for ID3v2.3 und ID3v2.4 tags):

From the [mapping documentation](https://docs.mp3tag.de/mapping/#length):

 ![image](https://community.mp3tag.de/uploads/default/original/3X/e/e/ee4bd38d122686357842a6bb6d81c56afd875d71.png)

---

<div class="post-metadata">

### Author: ![Beat](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@Beat](https://community.mp3tag.de/u/Beat)
#### Post date: [February 25, 2024, 2:47pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/5 "2024-02-25T14:47:51Z")

</div>

I understand your points. But at the moment I can only show these tags in the list panel. Nothing is written to the TLEN tag.  
Do I need to use **Actions (Alt-6)** or **Scripting**?

---

<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: [February 25, 2024, 2:48pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/6 "2024-02-25T14:48:46Z")

</div>

The tag panel does not show any properties with a name starting with an underscore (at the moment).

> [@Beat](#):
>
> Do I need to use **Actions (Alt-6)** or **Scripting**?

oops, I never pasted the FAQ thread.  
Here it is:

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967/15):
>
> How to copy one field value to another field? Example how to copy the content of the ARTIST field to the ALBUMARTIST field: Create a [new action](https://community.mp3tag.de/t/actions/967/2) in an existing action group or make a new action group. Action type: Format value Field: ALBUMARTIST Format string: %artist% Note: If you want to copy all possible values of a field (in case you have multiple artist fields), the internal scripting function [$meta\_sep](https://docs.mp3tag.de/scripting) can be used in the format string, e.g., $meta\_sep(artist,\\\\)

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [February 25, 2024, 2:57pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/7 "2024-02-25T14:57:41Z")

</div>

In the File List (as in your screenshot) you can use `%_length%` as Value to show the content of TLEN

![image](https://community.mp3tag.de/uploads/default/original/3X/d/1/d19683b5079f4ce43a77dd21e8aab6398d748fff.png)

Could you please show us the definition of your File List column TLEN?  
(Right click on the column header and click on the context entry "Customize Columns")

You can name your column however you like. Even "This is my track length" would be possible.

---

<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: [February 25, 2024, 3:10pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/8 "2024-02-25T15:10:38Z")

</div>

> [@Beat](#):
>
> But at the moment I can only show these tags in the list panel. Nothing is written to the TLEN tag.

Exactly.  
To get this straight:  
TLEN is a tag field from the ID3 standard that can contain more or less any data. MP3tag shows this field as LENGTH. This field does not get updated if the audio part of a file is changed in size.  
The real length of a file is written by the audio program and can be seen in MP3tag with \_LENGTH - but it cannot be modifed by MP3tag.  
If the real length should be displayed, then use \_LENGTH.

---

<div class="post-metadata">

### Author: ![Beat](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@Beat](https://community.mp3tag.de/u/Beat)
#### Post date: [February 25, 2024, 3:12pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/9 "2024-02-25T15:12:50Z")

</div>

Thank you all for the feedback, now I successfully wrote the Tag TLEN with my first simple Action. All is perfectly well, just if there is already a value in the TLEN then it will not be updated. But I can delete the value first , then it works super.

By the way the value of my TLEN column was simply %length%, was just to check whether the value was written or not.

![image](https://community.mp3tag.de/uploads/default/original/3X/e/7/e7586f3e181568aa81e1379c62d5a1d25f8abf1f.png)

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [February 25, 2024, 3:15pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/10 "2024-02-25T15:15:00Z")

</div>

May I ask you why do you use TLEN / LENGTH at all?

---

<div class="post-metadata">

### Author: ![Beat](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@Beat](https://community.mp3tag.de/u/Beat)
#### Post date: [February 25, 2024, 3:27pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/11 "2024-02-25T15:27:41Z")

</div>

In fact I will not use TLEN, rather I was just curious to explore the ID3 tags and on how to manipulate the tags, to get values. I am a beginner rather and I clean my MP3 list to be used in the car.

---

<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: [February 25, 2024, 3:35pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/12 "2024-02-25T15:35:35Z")

</div>

IMHO, it would have been much more effective to deal with fields and information that have a real value then spent all this effort with screendumps and actions of data that will not be used in the end.

Just a side note: as you do not get more accurate data for the length than with a resolution of 1 second, it is more or less pointless to multiply the value by 1000 to see the same data only this time with the unit milliseconds.  
So you could have used %\_length\_seconds% straightaway.

---

<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: [March 26, 2024, 3:36pm UTC](https://community.mp3tag.de/t/copy-tlen-to-length/63900/13 "2024-03-26T15:36:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
