# Exec node 2 commands after each other

**URL:** https://discourse.nodered.org/t/exec-node-2-commands-after-each-other/28957
**Category:** General
**Created:** [25 June 2020 09:53 UTC](https://discourse.nodered.org/t/exec-node-2-commands-after-each-other/28957 "2020-06-25T09:53:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zsoni96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zsoni96/32/26854_2.png) [@zsoni96](https://discourse.nodered.org/u/zsoni96)
#### Post date: [25 June 2020 09:53 UTC](https://discourse.nodered.org/t/exec-node-2-commands-after-each-other/28957/1 "2020-06-25T09:53:02Z")

</div>

Hi  
I ve got a question when I run exec commands it works perfectly but i want it to do 2 commands after each other is it posssible?

eg:

1. cd to a given directoy
2. start a sometgin in that directory eg.: a python script

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [25 June 2020 10:04 UTC](https://discourse.nodered.org/t/exec-node-2-commands-after-each-other/28957/2 "2020-06-25T10:04:18Z")

</div>

for example in Linux you could use `cd /mydir && run_my_app`  
or you could create a simple script/batch file and then call that.

---

<div class="post-metadata">

### Author: ![zsoni96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zsoni96/32/26854_2.png) [@zsoni96](https://discourse.nodered.org/u/zsoni96)
#### Post date: [25 June 2020 10:12 UTC](https://discourse.nodered.org/t/exec-node-2-commands-after-each-other/28957/3 "2020-06-25T10:12:07Z")

</div>

Thank you

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [9 July 2020 10:12 UTC](https://discourse.nodered.org/t/exec-node-2-commands-after-each-other/28957/4 "2020-07-09T10:12:14Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
