# Launch batch script after Dynamo script

**URL:** <https://forum.dynamobim.com/t/launch-batch-script-after-dynamo-script/20889>\
**Category:** Developers\
**Tags:** revit, dynamo\
**Created:** [April 10, 2018, 8:11am UTC](https://forum.dynamobim.com/t/launch-batch-script-after-dynamo-script/20889 "2018-04-10T08:11:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clement](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@Clement](https://forum.dynamobim.com/u/Clement)\
**Post date:** [April 10, 2018, 8:11am UTC](https://forum.dynamobim.com/t/launch-batch-script-after-dynamo-script/20889/1 "2018-04-10T08:11:54Z")

</div>

Hello,

I have written a dynamo script which exports schedule data to an Excel file.  
This is working great but I still have to find how to close the file opened by the node Write To Excel.

After that I need to run a python script which will parse data and calculate sums and so on.  
Unfortunately this can’t be done inside Dynamo as my script need more libs than what is included in IronPython.

So is it possible to launch a batch script or an external python script from Dynamo or Revit?  
OR Is it possible to launch a Dynamo script from a batch file?  
The two ways are good for me?

Thanks.

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [April 10, 2018, 8:20am UTC](https://forum.dynamobim.com/t/launch-batch-script-after-dynamo-script/20889/2 "2018-04-10T08:20:04Z")

</div>

Hi Clement

Have a look here, you might be able to use the libs through an intermediate file as described by @Dimitar_Venkov here:

> [@Importing .pyd module](https://forum.dynamobim.com/t/importing-pyd-module/17021/2):
>
> You can’t import C python modules directly into iron python but you can launch a sub-process with a regular python interpreter (or any other program for that matter), pipe data over to the sub-process, perform the desired functionality and finally bring the result back over to Dynamo. A common way to send data back and forward is with an intermediate file.
