# File series reader should get time from filename

**URL:** https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528
**Category:** Feature Requests
**Created:** [July 17, 2023, 2:37pm UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528 "2023-07-17T14:37:10Z")
**Posts on this page:** 7
**Page:** 1

<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: [July 17, 2023, 2:37pm UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528/1 "2023-07-17T14:37:10Z")

</div>

Several file formats that do not directly support time allow a series of similarly named files to be treated as a time progression, which is internally implemented with a `FileSeriesReader` meta reader object. The `FileSeriesReader` naively ignores the name of any file in the list and assigns integer time indices starting at 0.

However, it is common practice to encode the simulation time in the file name. When this happens, ParaView ignores the simulation time, and it can be very challenging to get it back.

The `FileSeriesReader` should check its list of files and see if it follows a pattern that has a common name with a varying number, extract that number from each filename, and use that number for the time value.

It should be possible to turn this feature off (advanced property, default to on).

---

<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: [July 17, 2023, 2:38pm UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528/2 "2023-07-17T14:38:10Z")

</div>

I bring this up because questions on this discourse regularly come up because ParaView is ignoring the obvious time values in filenames. The most recent one is [How can I adjust the starting step of the STL files?](https://discourse.paraview.org/t/how-can-i-adjust-the-starting-step-of-the-stl-files/12525), but many others can be found.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [July 17, 2023, 5:26pm UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528/3 "2023-07-17T17:26:34Z")

</div>

Hi Ken,  
Please write up a feature request. Add my username to it, and Sandia will fund it.  
Alan

---

<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: [July 17, 2023, 5:49pm UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528/4 "2023-07-17T17:49:04Z")

</div>

Done: [https://gitlab.kitware.com/paraview/paraview/-/issues/22224](https://gitlab.kitware.com/paraview/paraview/-/issues/22224)

---

<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: [July 24, 2023, 9:14am UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528/5 "2023-07-24T09:14:32Z")

</div>

With the possibility of creating a `.series` file, I’m unsure we want to add complexity to the file series reader.

Wdyt @cory.quammen ?

---

<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: [July 24, 2023, 12:23pm UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528/6 "2023-07-24T12:23:57Z")

</div>

That’s a fair point, @mwestphal. (It would be better if the `.series` reader was actually documented.)

But to argue this point a little bit, while creating a `.series` file could usually be generated with something like a clever shell script, doing so is not exactly trivial and is probably beyond the skill level of many scientific ParaView users.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [July 24, 2023, 7:21pm UTC](https://discourse.paraview.org/t/file-series-reader-should-get-time-from-filename/12528/7 "2023-07-24T19:21:02Z")

</div>

Ken, I’m wondering if your second paragraph is correct. pvd files aren’t that complex, and if .series files were documented well, would be easy to create.
