# Number of files in time series

**URL:** https://discourse.paraview.org/t/number-of-files-in-time-series/15599
**Category:** Development
**Tags:** vtk
**Created:** [October 21, 2024, 2:40pm UTC](https://discourse.paraview.org/t/number-of-files-in-time-series/15599 "2024-10-21T14:40:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ThomasAC](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/90db22/32.png) [@ThomasAC](https://discourse.paraview.org/u/ThomasAC)
#### Post date: [October 21, 2024, 2:40pm UTC](https://discourse.paraview.org/t/number-of-files-in-time-series/15599/1 "2024-10-21T14:40:14Z")

</div>

Hi,

I am writing a reader plugin and would like to make the plugin do something slightly different in case a time series is loaded.  
How do I get the number of files in a time series or how what is the simplest way to identify whether I have a time series or a single file?

Many thank!

Best,  
Thomas

---

<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: [October 21, 2024, 2:42pm UTC](https://discourse.paraview.org/t/number-of-files-in-time-series/15599/2 "2024-10-21T14:42:43Z")

</div>

file series are handled through the FileSeriesReader usually, are you doing that already ?

---

<div class="post-metadata">

### Author: ![ThomasAC](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/90db22/32.png) [@ThomasAC](https://discourse.paraview.org/u/ThomasAC)
#### Post date: [October 22, 2024, 7:29am UTC](https://discourse.paraview.org/t/number-of-files-in-time-series/15599/3 "2024-10-22T07:29:50Z")

</div>

Hi,

the reader itself is inherits from vtkMultiBlockDataSetAlgorithm but is made to work with file series as described here: [https://www.paraview.org/Wiki/Animating\_legacy\_VTK\_file\_series](https://www.paraview.org/Wiki/Animating_legacy_VTK_file_series)

Best,  
Thomas

---

<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: [October 22, 2024, 7:57am UTC](https://discourse.paraview.org/t/number-of-files-in-time-series/15599/4 "2024-10-22T07:57:40Z")

</div>

Ok, so you want to do something different than what the `vtkFileSeriesReader` is doing ? In that case you will need to implement your own `vtkFileSeriesReader` (or inherit from it) in order to do that.

---

<div class="post-metadata">

### Author: ![ThomasAC](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/t/90db22/32.png) [@ThomasAC](https://discourse.paraview.org/u/ThomasAC)
#### Post date: [October 22, 2024, 11:52am UTC](https://discourse.paraview.org/t/number-of-files-in-time-series/15599/5 "2024-10-22T11:52:21Z")

</div>

Ah, so far we didn’t include the `vtkFileSeriesReader`. We took the `CDIReader` as example and it does what we want.

Thank you very much!
