# Can you maintain file order when exporting?

**URL:** https://community.mp3tag.de/t/can-you-maintain-file-order-when-exporting/16998
**Category:** Export
**Created:** [June 26, 2015, 10:29am UTC](https://community.mp3tag.de/t/can-you-maintain-file-order-when-exporting/16998 "2015-06-26T10:29:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![HiGhGuY](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/ce73a5/32.png) [@HiGhGuY](https://community.mp3tag.de/u/HiGhGuY)
#### Post date: [June 26, 2015, 10:29am UTC](https://community.mp3tag.de/t/can-you-maintain-file-order-when-exporting/16998/1 "2015-06-26T10:29:44Z")

</div>

Every time I export, the list is always in alphabetical order by filename. But I want the export list to be ordered the same way I have the files in the Mp3tag program itself ordered.

For example, what I'm working on now, is ordered primarily by "album artist" and for multiple songs by the same artist, they are then sub ordered alphabetically by "title".

Is this possible? If not, I would like to request it as a feature in a future release. Thanks.

---

<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: [June 26, 2015, 11:18am UTC](https://community.mp3tag.de/t/can-you-maintain-file-order-when-exporting/16998/2 "2015-06-26T11:18:13Z")

</div>

> [@HiGhGuY](#):
>
> Every time I export, the list is always in alphabetical order by filename. But I want the export list to be ordered ... primarily by "album artist" and for multiple songs by the same artist, they are then sub ordered alphabetically by "title" ...

See there for an example script ... and modify it to your needs ...  
[Export csv script - need help with excluding Various Artists albums](https://community.mp3tag.de/t/15766/4)

... or write an export script something like this ...

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

**2: $loop($if2(%ALBUMARTIST%,%ARTIST%))$if2(%ALBUMARTIST%,%ARTIST%)  
3: $loop(%TITLE%)%TRACK%' - '%TITLE%' - '%ARTIST%' - '%ALBUM%' - '%YEAR%  
4: $loopend()  
5: $loopend()**

 

DD.20150626.1540.CEST
