# Sort the Artists by the number of their Titles

**URL:** https://community.mp3tag.de/t/sort-the-artists-by-the-number-of-their-titles/15210
**Category:** General Discussion
**Created:** [November 16, 2013, 7:28pm UTC](https://community.mp3tag.de/t/sort-the-artists-by-the-number-of-their-titles/15210 "2013-11-16T19:28:47Z")
**Posts on this page:** 1
**Showing post:** 7

<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: [November 17, 2013, 9:05am UTC](https://community.mp3tag.de/t/sort-the-artists-by-the-number-of-their-titles/15210/7 "2013-11-17T09:05:50Z")

</div>

> [@oo131193oo](#):
>
> ... is it possible to sort the artist coloumn by the number of titles a artist has?  
> So that I can see who has the most titles in my Library and the less. ...

Your request is similar to this question ...  
Listing all Artists from Album into One Tag Field  
[/t/14438/1](https://community.mp3tag.de/t/14438/1)

I have modified my export script proposal from there to apply here.

**1: $filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.Report.PrepareArtistSortByNumberOfFiles.txt',UTF-8)** 

**2: $loop(%ARTIST%)$puts(CountFiles,0)$loop(%ARTIST%)$loop(%\_path%)$puts(CountFiles,$add($get(CountFiles),1))$loopend()$loopend()  
3: $loop(%ARTIST%)'"'%ARTIST%'","'$get(CountFiles)'","'%\_path%'"'  
4: $loopend()$loopend()  
5: $puts(Info,'This Mp3tag export script creates a report text file of format CSV (comma separated values).')  
6: $puts(Info,'The CSV columns are: "Artist","CountFiles","Filepath".')  
7: $puts(Info,'The CSV output list is sorted by "Artist".')  
8: $puts(Info,'The CSV column "CountFiles" contains the sum of files per artist, which have been collected from the files of the related Artist.')$puts(Info,)**

 

You have to import the report output file into the selected files, ...  
using the converter "Textfile -Tag" with a format string like ...  
"%DUMMY%","%SumOfFilesPerArtist%","%\_path%"

 

The import process complains about empty lines, which cannot be parsed, this can be ignored.

 

You have to create a column in the Mp3tag grid view for the new tag field ...  
Name = SumOfFilesPerArtist  
Value = %SumOfFilesPerArtist%  
Numerical = yes

 

Then sort the track list using this column.

 

[20131117.PrepareArtistSortByNumberOfFiles.mte](https://community.mp3tag.de/uploads/default/original/2X/4/4f3c52ca982b1a15196a889aef5c3449c79a602e.mte) (755 Bytes)  
DD.20131117.1118.CET

 

[20131117.PrepareArtistSortByNumberOfFiles.mte](https://community.mp3tag.de/uploads/default/original/2X/4/4f3c52ca982b1a15196a889aef5c3449c79a602e.mte) (755 Bytes)

---

_[View the full topic](https://community.mp3tag.de/t/sort-the-artists-by-the-number-of-their-titles/15210)._
