# Unique Album Category ID

**URL:** https://community.mp3tag.de/t/unique-album-category-id/12054
**Category:** Support
**Created:** [May 29, 2011, 4:45am UTC](https://community.mp3tag.de/t/unique-album-category-id/12054 "2011-05-29T04:45:57Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [May 29, 2011, 12:35pm UTC](https://community.mp3tag.de/t/unique-album-category-id/12054/4 "2011-05-29T12:35:20Z")

</div>

> [@necrosis](#):
>
> ... I want to organize and import my complete mp3 collection within a webbased collection tool.  
> For this to work i need to create a CateroryID and a"ProductID" (Those are just the field names the tool uses. ... generate for each directory (and sub directory's) an unique ID number (not need to be worldwide unique, just within the tool). Within these directory's are MP3 songs. These need to get an unique ProductID according to the CategoryID (it just append\*.1, \*.2 etc..) ...

As I understand the situation ...

- You speak of CatalogID, CategoryID, ProductID, so CatalogID and CategoryID are used as synonyms?
- Does the CategoryID have the importance of Genre or other musical classification? Or is it in your case of application just the same as the folderpath?
- The ProductID is needed per track? You want to create the PRoductID simply by appending a running number to the CategoryID?
- Does it be true, that all IDs are not visible to the user, must not be human readable, and are only used internally by the database?

I recommend to use a GUID as ProductID per track and a GUID per Album as CategoryID.  
GUIDs can be created rather easy.  
See also ...  
[Cover Bilder exportieren - importieren](https://community.mp3tag.de/t/11520/4)  
Once the GUID list file has been created, the converter Textfile - Tag can import the GUIDs into the tracks.

If you want to create your own running number based routine, then you may play with the following MTE export script to understand how to code a $loop() ... $loopend() structure and how to use %\_counter% placeholder.  
Be aware that the Mp3tag Export Scripting Language does not support to $get() a $put() variable within a loop, which has been defined outside of the loop.

**$filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.Export.txt',ANSI) $loop(%\_folderpath%,1)$loopend()'1: All FolderCount = '%\_max\_counter% $loop(%\_path%)$loopend()'2: All FileCount = '%\_max\_counter% $repeat('=',50) $loop(%\_folderpath%,1) '3: FolderNumber = '%\_counter% '4: FolderPath = '%\_folderpath% $loop(%\_path%)$loopend()'5: FileCount = '%\_max\_counter% $loop(%\_path%) '6: FileNumber = '%\_counter% '7: FilePath = '%\_path% $loopend()$repeat('-',50) $loopend()**

DD.20110529.1637.CEST

---

_[View the full topic](https://community.mp3tag.de/t/unique-album-category-id/12054)._
