# Organize music into folders based on first initial

**URL:** https://community.mp3tag.de/t/organize-music-into-folders-based-on-first-initial/41637
**Category:** Support
**Created:** [May 7, 2018, 6:18pm UTC](https://community.mp3tag.de/t/organize-music-into-folders-based-on-first-initial/41637 "2018-05-07T18:18:43Z")
**Posts on this page:** 1
**Showing post:** 2

<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 7, 2018, 6:35pm UTC](https://community.mp3tag.de/t/organize-music-into-folders-based-on-first-initial/41637/2 "2018-05-07T18:35:57Z")

</div>

there are a number of threads:

> [@Make directory from the first letter of an artist.](https://community.mp3tag.de/t/make-directory-from-the-first-letter-of-an-artist/18045):
>
> I would like to sort my files to folders by the first letter of the artist. I found this [old thread](https://community.mp3tag.de/t/1179/1), but "$left("%artist%",1)" isn't working for me. This is what I did based on the other thread: Z:\My Music\<!--coloro:#FF0000--\>$left("%artist%",1)\%artist%\%artist% - %year% - %comment% - %album%[- %discnumber%] Making a new post since that one was 12 years ago.

or here:

> [@Regex first character Alphabet only](https://community.mp3tag.de/t/regex-first-character-alphabet-only/14502/2):
>
> Please don't forget: Where do you want to move special characters like Д or Э or Ø or 菅? Should they go to 0-9 too? And there some more like !distain [product] .hiDDen tiMe !!! There are even some characters who seems to be between A-Z (example: ВЕЧЕ or РАРОГЪ), but the B and P are not the usual one... Sorry, not really helpful. Just my 2 cents.

I think you would have to use the field ARTISTSORT to get the right name with or without the "The". "Beatles, The" might be rather straight forward, "The, The" probably is not, groups like "The Head & The Heart" are rather special ...  
To get the first character from the ARTISTSORT field, use  
$left(%artiststsort%,1)  
and to get all the special ones like 21 Savage use  
$replace($left(%artiststsort%,1),1,#,2,#,3,#,4,#,5,#,6,#,7,#,8,#,9,#)  
or perhaps a little sleaker:

$if($isdigit($left(%ARTISTSORT%,1)),#,$upper($left(%ARTISTSORT%,1)))

A personal note right here:  
Even though it is technically possible, I would not do it.  
I think that the extra letter plus the folder separation character `\` gobbles up valuable space for filenames.  
As you have to fill the ARTISTSORT field anyway, it would be enough to get all the Beatles tracks together into one folder "Beatles" (or "Rolling Stones" even, not "The Rolling Stones"). Any player should find the correct artist, it should not be necessary to use the filesystem as major sorting instance.  
But as I said: just my personal opinion.

---

_[View the full topic](https://community.mp3tag.de/t/organize-music-into-folders-based-on-first-initial/41637)._
