# Create a reader plugin to read multiple files into one vtkMultiBlockDataSet

**URL:** https://discourse.paraview.org/t/create-a-reader-plugin-to-read-multiple-files-into-one-vtkmultiblockdataset/1895
**Category:** Development
**Created:** [May 21, 2019, 12:07pm UTC](https://discourse.paraview.org/t/create-a-reader-plugin-to-read-multiple-files-into-one-vtkmultiblockdataset/1895 "2019-05-21T12:07:06Z")
**Posts on this page:** 1
**Showing post:** 9

<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: [May 21, 2019, 12:36pm UTC](https://discourse.paraview.org/t/create-a-reader-plugin-to-read-multiple-files-into-one-vtkmultiblockdataset/1895/9 "2019-05-21T12:36:47Z")

</div>

> [@sharon](#):
>
> You mean I can read all the files under the same directory when user choose one file?

Yes

> [@](#):
>
> I am confused when user choose a directory, how can paraview know which reader to use?
> 
> And if i write my own reader, how can tell paraview to use my reader after user select certain directory?
> 
> Because for a file, there is a suffix to tell reader, but for a directory, how to know?

There is a pattern mechanism in the XML definition of the reader, see AMReX Particles Reader in readers.xml

---

_[View the full topic](https://discourse.paraview.org/t/create-a-reader-plugin-to-read-multiple-files-into-one-vtkmultiblockdataset/1895)._
