# Post processing file convertion from .pyfrs to .vtu

**URL:** <https://pyfr.discourse.group/t/post-processing-file-convertion-from-pyfrs-to-vtu/170>\
**Category:** General\
**Created:** [29 August 2017 09:25 UTC](https://pyfr.discourse.group/t/post-processing-file-convertion-from-pyfrs-to-vtu/170 "2017-08-29T09:25:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ezhilmathi\_Krishnasa](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@Ezhilmathi\_Krishnasa](https://pyfr.discourse.group/u/Ezhilmathi_Krishnasa)\
**Post date:** [29 August 2017 09:25 UTC](https://pyfr.discourse.group/t/post-processing-file-convertion-from-pyfrs-to-vtu/170/1 "2017-08-29T09:25:22Z")

</div>

Hi,

Is there any way to convert all the files into once.  
For example, I have couette\_flow\_2d-000.pyfrs up to 050.pyfrs.

There is a script to convert the files:  
`pyfr export mesh.pyfrm solution.pyfrs solution.vtu`

I do not want to do one by one, I would like to  
do all in once.

Best regards,  
Mathi

---

<div class="post-metadata">

**Author:** ![Zach\_Davis1](https://avatars.discourse-cdn.com/v4/letter/z/3ec8ea/32.png) [@Zach\_Davis1](https://pyfr.discourse.group/u/Zach_Davis1)\
**Post date:** [29 August 2017 13:33 UTC](https://pyfr.discourse.group/t/post-processing-file-convertion-from-pyfrs-to-vtu/170/2 "2017-08-29T13:33:27Z")

</div>

Hi Mathi,

You can accomplish this pretty quickly by looping over all the files in a UNIX shell:

`for file in *.pyfrs ; do pyfr export -p double -g -d 16 my_mesh_filename.pyfrm ${file} ${file%.*}.vtu ; done`

I imagine something similar could be accomplished under a Windows platform using the command line or PowerShell.

Best Regards,

---

<div class="post-metadata">

**Author:** ![Ezhilmathi\_Krishnasa](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@Ezhilmathi\_Krishnasa](https://pyfr.discourse.group/u/Ezhilmathi_Krishnasa)\
**Post date:** [9 September 2017 14:22 UTC](https://pyfr.discourse.group/t/post-processing-file-convertion-from-pyfrs-to-vtu/170/3 "2017-09-09T14:22:27Z")

</div>

Hi Zach,

Thanks! this one as well work in sort of parallel with available threads on the node or CPU.  
for file in _.pyfrs ;  
do  
pyfr export -p double -g -d 16 my\_mesh\_filename.pyfrm ${file} ${file%._}.vtu &  
done  
wait

Cheers,  
Mathi
