# Action, UUID and multiple selected tracks

**URL:** https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406
**Category:** Support
**Created:** [May 5, 2025, 10:48am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406 "2025-05-05T10:48:27Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![pauqito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pauqito](https://community.mp3tag.de/u/pauqito)
#### Post date: [May 5, 2025, 10:48am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/1 "2025-05-05T10:48:27Z")

</div>

Is there a way to create action which generates one common unique identifier (UUID) to all selected tracks. Not unique to each of selected tracks, but one which is same to all of them.

---

<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: [May 5, 2025, 10:52am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/2 "2025-05-05T10:52:18Z")

</div>

> [@pauqito](#):
>
> generates one common unique identifier (UUID) to all selected tracks.

I don't know about the generating algorithm - but you can set an ID with Convert\>Tag-Tag for the target field.  
Enter as format string the id that you want to apply.

---

<div class="post-metadata">

### Author: ![pauqito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pauqito](https://community.mp3tag.de/u/pauqito)
#### Post date: [May 5, 2025, 11:02am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/3 "2025-05-05T11:02:31Z")

</div>

My description was bit unclear. I mean I am looking for a this kind of solution: generate one UUID and then use it for all selected tracks. This is how I am doing it now:

- Select tracks
- Then start action which generates UUID for all the tracks
- Then manually update one of the generated UUID for all selected tracks

I like to have a action for the last two steps so I wouldn't have to do that manual step

---

<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: [May 5, 2025, 11:05am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/4 "2025-05-05T11:05:04Z")

</div>

You want to generate 1 UUID.  
Then you want to apply this 1 UUID to all selected tracks.  
All the selected tracks becomes the same UUID?

I'm just curious: why do you want to do this?

---

<div class="post-metadata">

### Author: ![pauqito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pauqito](https://community.mp3tag.de/u/pauqito)
#### Post date: [May 5, 2025, 11:09am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/5 "2025-05-05T11:09:28Z")

</div>

I like to have unique identifier for the album.

---

<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: [May 5, 2025, 11:24am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/6 "2025-05-05T11:24:51Z")

</div>

I like that too.  
But I use the MUSICBRAINZ\_ALBUMID (as one possible UUID) for this purpose.  
This ID will be set automatically by the various Web Source scripts.

---

<div class="post-metadata">

### Author: ![pauqito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pauqito](https://community.mp3tag.de/u/pauqito)
#### Post date: [May 5, 2025, 11:30am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/7 "2025-05-05T11:30:33Z")

</div>

At the moment, I am also using MUSICBRAINZ\_ALBUMID for this purpose. It works great, but sometimes I have album which cannot be found from musicbrainz library. Then I have two options: insert the album to musicbrainz to myself, or use some other unique number instead.

---

<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: [May 5, 2025, 11:32am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/8 "2025-05-05T11:32:23Z")

</div>

> [@pauqito](#):
>
> This is how I am doing it now:

Yes. That is more or less what I described.  
The only thing is: MP3tag does not remember which ids it has used so far. You would have to do the bookkeeping.  
And once you know which ID you want to set, transfer it to the files in the already described way.

---

<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: [May 5, 2025, 11:57am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/9 "2025-05-05T11:57:21Z")

</div>

> [@pauqito](#):
>
> Then I have two options:

If it is too time-consuming to add the metadata at MusicBrainz myself right away, I use a third option: I leave the ID empty.  
And then, sometimes later, I re-check such empty MUSICBRAINZ\_ALBUMIDs again with MusicBrainz.

---

<div class="post-metadata">

### Author: ![pauqito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pauqito](https://community.mp3tag.de/u/pauqito)
#### Post date: [May 5, 2025, 12:15pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/10 "2025-05-05T12:15:19Z")

</div>

The main reason why I add MUSICBRAINZ\_ALBUMIDs to my albums is not the need to have them connected the certain album which can be found from the musicbrainz library (although that is nice thing to have). The main reason (for me) is just have some unique album id. I am using LMS (Lyrion) for my music server and it gets confused if there is a multiple versions of multidiscs albums. For example I have three versions of The Beatles album (=White album) and if the albums don't have unique MUSICBRAINZ\_ALBUMIDs then LMS thinks that there is only one album with 6 discs.

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [May 5, 2025, 12:21pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/11 "2025-05-05T12:21:47Z")

</div>

> [@pauqito](#):
>
> Then start action which generates UUID for all the tracks

And how are you doing that now?

---

<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: [May 5, 2025, 12:24pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/12 "2025-05-05T12:24:12Z")

</div>

Really, a player relies on a user-defined, database specific tag field to keep albums apart?

Anyway:  
If you do not really care about the accuracy of an ID, set the current date and time as ID - that should be unique enough.  
e.g. with  
`$replace(%_datetime%,.,,:,, ,)`

---

<div class="post-metadata">

### Author: ![pauqito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pauqito](https://community.mp3tag.de/u/pauqito)
#### Post date: [May 5, 2025, 12:35pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/14 "2025-05-05T12:35:05Z")

</div>

Using mp3tag's $uuid() function.

---

<div class="post-metadata">

### Author: ![pauqito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/45deac/32.png) [@pauqito](https://community.mp3tag.de/u/pauqito)
#### Post date: [May 5, 2025, 12:41pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/15 "2025-05-05T12:41:17Z")

</div>

Sorry, I don't quite understand how `$replace(%_datetime%,.,,:,, ,)` would solve the problem. Isn't it the same thing with that ? Every track gets "unique" id? Or am I missing something?

---

<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: [May 5, 2025, 12:47pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/16 "2025-05-05T12:47:34Z")

</div>

> [@pauqito](#):
>
> Isn't it the same thing with that ?

If the action runs quick enough, then you get the same date for all files.

Alternatively: try Convert\>Tag-Tag for the ID field with  
Format string: `$replace(%_datetime%,.,,:,, ,)`  
and use the data from the preview which you paste into the format string. Then you don't have to keep track which IDs you have used already and you don't run into problems, if $UUID() always starts with the same value.

---

<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: [May 5, 2025, 1:09pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/17 "2025-05-05T13:09:01Z")

</div>

> [@ohrenkino](#):
>
> $replace(%\_datetime%,.,,:,, ,)

And another suggestion, that works without the preview and copy& paste:  
Format string: `$div($replace(%_datetime%,.,,:,, ,),%_total_files%)`  
this takes the number of selected files into the calculation and keeps the value constant for the selected files.

---

<div class="post-metadata">

### Author: ![rboss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rboss](https://community.mp3tag.de/u/rboss)
#### Post date: [May 5, 2025, 3:53pm UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/18 "2025-05-05T15:53:16Z")

</div>

> [@LyricsLover](#):
>
> If it is too time-consuming to add the metadata at MusicBrainz myself right away, I use a third option: I leave the ID empty.

Just to chime in a 4th option: I use mainly `ITUNESALBUMID` as UUID source for my albums, and use `MUSICBRAINZ_ALBUMID` when I can't get results from the primary database. If that fails, I also use `DISCOGS_RELEASE_ID` and `CATALOGNUMBER` (from VGMdb). Since OP is only after \*a\* UUID (string format doesn't seem to be important) my suggestion is to use UUIDs from various databases.

---

<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: [July 4, 2025, 6:51am UTC](https://community.mp3tag.de/t/action-uuid-and-multiple-selected-tracks/68406/19 "2025-07-04T06:51:07Z")

</div>

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