# Sorting a FileList by Creation Date (Or anything else)

**URL:** https://community.linx.software/community/t/sorting-a-filelist-by-creation-date-or-anything-else/626
**Category:** How To
**Created:** [October 11, 2022, 7:14am UTC](https://community.linx.software/community/t/sorting-a-filelist-by-creation-date-or-anything-else/626 "2022-10-11T07:14:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Dawie\_Botes](https://community.linx.software/community/user_avatar/community.linx.software/dawie_botes/32/288_2.png) [@Dawie\_Botes](https://community.linx.software/community/u/Dawie_Botes)
#### Post date: [October 11, 2022, 7:14am UTC](https://community.linx.software/community/t/sorting-a-filelist-by-creation-date-or-anything-else/626/1 "2022-10-11T07:14:29Z")

</div>

By default, the FileList component does not have a property to allow you to sort your files. However, using the List functions [here](https://linx.software/docs/6/reference/plugins/linx/content/list/) you can quickly filter the files yourself.

Basically, first you’ll need to create a Type which corresponds with the result from a file list:

 ![Screenshot 2022-10-11 at 09.10.35](https://community.linx.software/community/uploads/default/original/2X/7/735e8778986399477a20369f9da5b425bbe7266a.png)

You can add a List of your new type to your function and assign the Files from the FileList. The key here is to also use the OrderBy / OrderByDescending function while you are doing the assignment:

> =FileList.Files.OrderBy(q =\> q.CreationTime)

or

> =FileList.Files.OrderByDescending(q =\> q.CreationTime)

Finally you can loop through your List of ordered files. Your function would look like this:

 ![Screenshot 2022-10-11 at 09.05.08](https://community.linx.software/community/uploads/default/original/2X/a/a5cb92d847470d88567e16f87849eaeb96462fd0.png)
