# Export to custom playlist

**URL:** https://community.mp3tag.de/t/export-to-custom-playlist/5970
**Category:** Support
**Created:** [December 28, 2007, 9:16am UTC](https://community.mp3tag.de/t/export-to-custom-playlist/5970 "2007-12-28T09:16:14Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [December 28, 2007, 12:38pm UTC](https://community.mp3tag.de/t/export-to-custom-playlist/5970/3 "2007-12-28T12:38:58Z")

</div>

> [@polobunny](#):
>
> ... My music is organized in 4 subfolders, "0 - E", "F - K", "L - R" and "S - Z". ... So I would like my mte script to automatically detect the first letter of the filename of each file and append the proper folder before it. ...

The following expression returns a category string in relation to the first letter of the filename, adapt it to your needs. $ifgreater($strchr('0123456789',$left(%\_FILENAME%,1)),0,'0 - 9',$ifgreater($strchr('ABCDEabcde',$left(%\_FILENAME%,1)),0,'A - E',$ifgreater($strchr('FGHIJKfghijk',$left(%\_FILENAME%,1)),0,'F - K',$ifgreater($strchr('LMNOPQRlmnopqr',$left(%\_FILENAME%,1)),0,'L - R',$ifgreater($strchr('STUVWXYZstuvwxyz',$left(%\_FILENAME%,1)),0,'S - Z','Special')))))

DD.20071228.1439.CET

---

_[View the full topic](https://community.mp3tag.de/t/export-to-custom-playlist/5970)._
