# Randomization of track with no playlist

**URL:** https://community.mp3tag.de/t/randomization-of-track-with-no-playlist/51441
**Category:** General Discussion
**Created:** [January 2, 2021, 6:00pm UTC](https://community.mp3tag.de/t/randomization-of-track-with-no-playlist/51441 "2021-01-02T18:00:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Techknowman](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@Techknowman](https://community.mp3tag.de/u/Techknowman)
#### Post date: [January 2, 2021, 6:00pm UTC](https://community.mp3tag.de/t/randomization-of-track-with-no-playlist/51441/1 "2021-01-02T18:00:45Z")

</div>

I would like a way to, say, randomly issue a number between 1 and the number of selected tracks to the "Track #" tag.  
This would allow, renaming the file name "Tag# (randomly generated) - Artist - Title"  
Or create a new tag

This would be a way of randomizing the files in the folder by file name for players that don't support playlists or don't support them well. I have several examples of these types of players.

---

<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: [January 2, 2021, 6:10pm UTC](https://community.mp3tag.de/t/randomization-of-track-with-no-playlist/51441/2 "2021-01-02T18:10:41Z")

</div>

You already can order the files randomly, see View\>Sort by\>Randomly.  
Then apply the track numbering wizard. This has the advantage that you get each number only once.  
Then there is the function $rand() which you could use to format the value of a (perhaps even user-defined) field, see the help

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#arithmetic-functions)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![Techknowman](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@Techknowman](https://community.mp3tag.de/u/Techknowman)
#### Post date: [January 2, 2021, 6:34pm UTC](https://community.mp3tag.de/t/randomization-of-track-with-no-playlist/51441/3 "2021-01-02T18:34:20Z")

</div>

> [@ohrenkino](#):
>
> You already can order the files randomly, see View\>Sort by\>Randomly.  
> Then apply the track numbering wizard. This has the advantage that you get each number only once.

THIS IS PERFECT. It works exactly like I want it to! Thanks.

---

<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 1, 2021, 6:34pm UTC](https://community.mp3tag.de/t/randomization-of-track-with-no-playlist/51441/4 "2021-02-01T18:34:21Z")

</div>

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