# sorting options for export

**URL:** https://community.mp3tag.de/t/sorting-options-for-export/14946
**Category:** General Discussion
**Created:** [July 30, 2013, 4:24pm UTC](https://community.mp3tag.de/t/sorting-options-for-export/14946 "2013-07-30T16:24:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mnat](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@mnat](https://community.mp3tag.de/u/mnat)
#### Post date: [July 30, 2013, 4:24pm UTC](https://community.mp3tag.de/t/sorting-options-for-export/14946/1 "2013-07-30T16:24:33Z")

</div>

Dear all  
I want to export the tags to a HTML file. However I see that they are sorted based on the Track number. How can I change the default sort option from track number to filename? I can not find where

The export function looks like

```
$filename(html,utf-8)<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
    <meta name="GENERATOR" content="Mp3tag - http://www.mp3tag.de" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Mp3tag - File Overview</title>
    <style type="text/css"><!--
        h1 { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 14pt; color: #000 }
        body { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 8pt; background: #fff }
        table, tr, td { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 9pt; color: #000; }
        a:link, a:visited, a:active { text-decoration: none; color: #03f; }
        a:hover { text-decoration: none; color: #f03; }
        .title { font-weight: bold; padding: 7px; margin: 0px; color: #000; }
        .odd { background-color: #ccc; }
    --></style>
</head>
<body>
    <h1>Mp3tag - File Overview</h1>
    <p>%_date%</p>
    <table>
        <tr>
            <th class="title">Title</th>
            <th class="title">Artist</th>
            <th class="title">Album</th>
            <th class="title">Track</th>
            <th class="title">Year</th>
            <th class="title">Genre</th>
            <th class="title">Filename</th>
        </tr>

$loop(%_filename_ext%)
        <tr>
            <td$if($odd(%_counter%), class="odd",)>$replace(%title%,&,&amp;)</td>
            <td$if($odd(%_counter%), class="odd",)>$replace(%artist%,&,&amp;)</td>
            <td$if($odd(%_counter%), class="odd",)>$replace(%album%,&,&amp;)</td>
            <td$if($odd(%_counter%), class="odd",)>$replace(%track%,&,&amp;)</td>
            <td$if($odd(%_counter%), class="odd",)>$replace(%year%,&,&amp;)</td>
            <td$if($odd(%_counter%), class="odd",)>$replace(%genre%,&,&amp;)</td>
            <td$if($odd(%_counter%), class="odd",)>$replace(%_filename_ext%,&,&amp;)</td>
        </tr>
$loopend()

    </table>
    <p>build on %_date% with %_app% - the universal Tag Editor <a href="http://www.mp3tag.de/en/" title="Mp3tag Website">www.mp3tag.de</a></p>
</body>
</html>
```

---

<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: [July 30, 2013, 4:31pm UTC](https://community.mp3tag.de/t/sorting-options-for-export/14946/2 "2013-07-30T16:31:24Z")

</div>

I think that this export script sort by  
%\_filename\_ext%, as can be seen in the line

$loop(%\_filename\_ext%)

So apparently, your filename starts with the track number....

---

<div class="post-metadata">

### Author: ![mnat](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@mnat](https://community.mp3tag.de/u/mnat)
#### Post date: [July 30, 2013, 5:11pm UTC](https://community.mp3tag.de/t/sorting-options-for-export/14946/3 "2013-07-30T17:11:01Z")

</div>

Yeah thanks a lot for the point. I changed it to desired option
