# 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:** 1
**Showing post:** 2

<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

---

_[View the full topic](https://community.mp3tag.de/t/can-you-maintain-file-order-when-exporting/16998)._
