# Change in the order of vtk files

**URL:** https://discourse.paraview.org/t/change-in-the-order-of-vtk-files/3312
**Category:** ParaView Support
**Created:** [January 10, 2020, 8:13pm UTC](https://discourse.paraview.org/t/change-in-the-order-of-vtk-files/3312 "2020-01-10T20:13:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Marf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/marf/32/2684_2.png) [@Marf](https://discourse.paraview.org/u/Marf)
#### Post date: [January 10, 2020, 8:13pm UTC](https://discourse.paraview.org/t/change-in-the-order-of-vtk-files/3312/1 "2020-01-10T20:13:23Z")

</div>

I have created vtk files of each time step but the order is very messed up if I load in Paraview. It looks like that

 ![11](https://discourse.paraview.org/uploads/default/original/2X/1/167513a8bb56d24433adc7fab658648b7e3a9fec.png)

How to select with the original order?

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [January 11, 2020, 6:36pm UTC](https://discourse.paraview.org/t/change-in-the-order-of-vtk-files/3312/2 "2020-01-11T18:36:07Z")

</div>

ParaView sorts the files in a group by their [lexicographical order](https://en.wikipedia.org/wiki/Lexicographical_order), not their numerical order. So a file named `time_1000.vtk` will be earlier in the list than `time_150.vtk` because the 0 after the 1 in the first name is lexicographically earlier than the 5 in the second name.

The easiest solution is to use 0-padding in the numbers in. your file names. For example, if your files were named `time_0001.vtk`, `time_0100.vtk`, `time_0150.vtk`, `time_1000.vtk`, etc., they would be displayed in the correct order.

---

<div class="post-metadata">

### Author: ![Marf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/marf/32/2684_2.png) [@Marf](https://discourse.paraview.org/u/Marf)
#### Post date: [January 11, 2020, 11:52pm UTC](https://discourse.paraview.org/t/change-in-the-order-of-vtk-files/3312/3 "2020-01-11T23:52:08Z")

</div>

Actually, with the older versions, the files are selected in the manner they are created. For example, have a look at this

 ![5545](https://discourse.paraview.org/uploads/default/original/2X/0/09ea3b0a4ad4192a178ccc8d885757a3fcc0b215.png)

It shows the order in which I created.  
Perhaps something is wrong with the new version.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 13, 2020, 12:41pm UTC](https://discourse.paraview.org/t/change-in-the-order-of-vtk-files/3312/4 "2020-01-13T12:41:22Z")

</div>

ParaView 4.4 was built with Qt4, this may be the reason of this change of behavior.

---

<div class="post-metadata">

### Author: ![olesenm](https://discourse.paraview.org/user_avatar/discourse.paraview.org/olesenm/32/17416_2.png) [@olesenm](https://discourse.paraview.org/u/olesenm)
#### Post date: [January 13, 2020, 2:50pm UTC](https://discourse.paraview.org/t/change-in-the-order-of-vtk-files/3312/5 "2020-01-13T14:50:07Z")

</div>

Looks like a misfeature in the older version. I would expect lexicographical sort (even if a natural sort would be nicer). Sorting based on time-stamps makes things non-reproducible.
