# Can I load one file sequences from separate folders?

**URL:** https://discourse.paraview.org/t/can-i-load-one-file-sequences-from-separate-folders/3465
**Category:** ParaView Support
**Created:** [January 30, 2020, 4:41pm UTC](https://discourse.paraview.org/t/can-i-load-one-file-sequences-from-separate-folders/3465 "2020-01-30T16:41:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wyan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wyan/32/1604_2.png) [@wyan](https://discourse.paraview.org/u/wyan)
#### Post date: [January 30, 2020, 4:41pm UTC](https://discourse.paraview.org/t/can-i-load-one-file-sequences-from-separate-folders/3465/1 "2020-01-30T16:41:37Z")

</div>

We have a network file system where the maximum number of files per folder is quite limited so we have to do things like this:  
folder1: result0.vtp - result100.vtp  
folder2: result101.vtp - result200.vtp  
…

My current quick and dirty solution is to create a folder where the number of files is unlimited and create symlinks to all result\*.vtp files so Paraview can load all of them at once.

My questions are:  
Can I load these files into one file sequence through the paraview GUI? It seems that only sequences within one folder is supported.

Can I load these files into one file sequence through the python interface?

Thanks!

---

<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 30, 2020, 7:05pm UTC](https://discourse.paraview.org/t/can-i-load-one-file-sequences-from-separate-folders/3465/2 "2020-01-30T19:05:36Z")

</div>

I don’t think there is any direct way to get the GUI to load all those files at once. However, you should be able to do it through the Python interface.

The Python command to open a vtp file is `XMLUnstructuredGridReader`. If you set the `FileName` argument to a list of files, that list of files will be treated as a time sequence of files. So the relevant Python would look something like this.

```python
result = XMLUnstructuredGridReader(FileName=[
    '/path/to/folder1/result0.vtp',
    '/path/to/folder1/result2.vtp',
    '/path/to/folder1/result3.vtp',
    # ...
    '/path/to/folder2/result101.vtp',
    '/path/to/folder2/result102.vtp',
    '/path/to/folder2/result103.vtp',
    # ...
])

```

An alternate approach is to create a pvd file that points to all the files that you created. It would look something like this.

```xml
<VTKFile type="Collection" version="1.0" byte_order="LittleEndian" header_type="UInt64">
  <Collection>
    <DataSet timestep="0" part="0" file="folder1/result0.vtp"/>
    <DataSet timestep="1" part="0" file="folder1/result1.vtp"/>
    <DataSet timestep="2" part="0" file="folder1/result2.vtp"/>
    <!-- ... -->
    <DataSet timestep="101" part="0" file="folder2/result101.vtp"/>
    <DataSet timestep="102" part="0" file="folder2/result102.vtp"/>
    <DataSet timestep="103" part="0" file="folder2/result103.vtp"/>
    <!-- ... -->
  </Collection>
</VTKFile>

```

That solution is not any more elegant than using `ln -s`, but at least it won’t break on your file system.

---

<div class="post-metadata">

### Author: ![wyan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wyan/32/1604_2.png) [@wyan](https://discourse.paraview.org/u/wyan)
#### Post date: [January 31, 2020, 3:37pm UTC](https://discourse.paraview.org/t/can-i-load-one-file-sequences-from-separate-folders/3465/3 "2020-01-31T15:37:26Z")

</div>

Thank you! This solves my problem.
