# How to put a random number in the title field?

**URL:** <https://community.mp3tag.de/t/how-to-put-a-random-number-in-the-title-field/17165>\
**Category:** Support\
**Created:** [August 20, 2015, 2:29pm UTC](https://community.mp3tag.de/t/how-to-put-a-random-number-in-the-title-field/17165 "2015-08-20T14:29:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zwizzor](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zwizzor/32/5121_2.png) [@Zwizzor](https://community.mp3tag.de/u/Zwizzor)\
**Post date:** [August 20, 2015, 2:29pm UTC](https://community.mp3tag.de/t/how-to-put-a-random-number-in-the-title-field/17165/1 "2015-08-20T14:29:50Z")

</div>

Hi everyone, I love this wonderful software that mp3tag is, but when it comes to scripting I really suck!  
I use a USB key to play music in my car and I noticed that the player plays in alphabetical order of the title field. Since it uses the file name as display name I already renamed all that, and now I would like to write random numbers in the title field in order to randomize the playlist a little bit. Could you help me with that please?

---

<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:** [August 20, 2015, 2:50pm UTC](https://community.mp3tag.de/t/how-to-put-a-random-number-in-the-title-field/17165/2 "2015-08-20T14:50:40Z")

</div>

You could do one of the following.  
Load the files into MP3tag.  
Click on the top left column header. This arranges the files in a random order.  
Now you could rename the files with:  
Convert\>Tag-Filename  
%\_counter% \_ %\_filename%

Or you rename them straight away with the Convert\>Tag-Filename function:  
$rand() \_ %\_filename%  
or even  
$num($rand(),5) \_ %\_filename%

---

<div class="post-metadata">

**Author:** ![Zwizzor](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zwizzor/32/5121_2.png) [@Zwizzor](https://community.mp3tag.de/u/Zwizzor)\
**Post date:** [August 20, 2015, 5:20pm UTC](https://community.mp3tag.de/t/how-to-put-a-random-number-in-the-title-field/17165/3 "2015-08-20T17:20:49Z")

</div>

> [@ohrenkino](#):
>
> You could do one of the following.  
> Load the files into MP3tag.  
> Click on the top left column header. This arranges the files in a random order.  
> Now you could rename the files with:  
> Convert\>Tag-Filename  
> %\_counter% \_ %\_filename%
> 
> Or you rename them straight away with the Convert\>Tag-Filename function:  
> $rand() \_ %\_filename%  
> or even  
> $num($rand(),5) \_ %\_filename%

Hey, thanks for your reply. However I do not want to change the filename, I want to change the title.

---

<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:** [August 20, 2015, 5:49pm UTC](https://community.mp3tag.de/t/how-to-put-a-random-number-in-the-title-field/17165/4 "2015-08-20T17:49:29Z")

</div>

> [@Zwizzor](#):
>
> Hey, thanks for your reply. However I do not want to change the filename, I want to change the title.

As you mentioned both ...

Use an action of the type "Format value" for TITLE  
Format string: $rand() \_ %title%

---

<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:25pm UTC](https://community.mp3tag.de/t/how-to-put-a-random-number-in-the-title-field/17165/5 "2026-02-09T12:25:49Z")

</div>


