# Multiple commands with command prompt

**URL:** <https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525>\
**Category:** Studio Pro\
**Created:** [October 16, 2023, 10:59am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525 "2023-10-16T10:59:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![applePie](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@applePie](https://forum.electroneek.com/u/applePie)\
**Post date:** [October 16, 2023, 10:59am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/1 "2023-10-16T10:59:41Z")

</div>

Hello,  
I am trying to run a python script using command prompt activity. I need to navigate to folder and then execute python.

1. cd OneDrive - company\Internt\02\_RPA\_Prosesser\Python
2. python getExcluds\_final.py

Any suggestions?

---

<div class="post-metadata">

**Author:** ![Kudlappa\_Gouder](https://forum.electroneek.com/user_avatar/forum.electroneek.com/kudlappa_gouder/32/371_2.png) [@Kudlappa\_Gouder](https://forum.electroneek.com/u/Kudlappa_Gouder)\
**Post date:** [October 19, 2023, 9:05am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/2 "2023-10-19T09:05:23Z")

</div>

@applePie Please try with &&. The command prompt will execute one command at a time. You can use below syntax to run two commands in single line  
cd “OneDrive - company\Internt\02\_RPA\_Prosesser\Python” && python getExcluds\_final.py

---

<div class="post-metadata">

**Author:** ![applePie](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@applePie](https://forum.electroneek.com/u/applePie)\
**Post date:** [October 19, 2023, 9:13am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/3 "2023-10-19T09:13:32Z")

</div>

Hi, I tried that already and it didnt work…

---

<div class="post-metadata">

**Author:** ![applePie](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@applePie](https://forum.electroneek.com/u/applePie)\
**Post date:** [October 19, 2023, 9:39am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/4 "2023-10-19T09:39:30Z")

</div>

I get this error:  
python: can’t open file ‘C:\Program Files\ElectroNeek Studio Pro\Loader\getExcluds\_final.py’: [Errno 2] No such file or directory

Not sure how to get around it

---

<div class="post-metadata">

**Author:** ![cris-dsc](https://forum.electroneek.com/user_avatar/forum.electroneek.com/cris-dsc/32/768_2.png) [@cris-dsc](https://forum.electroneek.com/u/cris-dsc)\
**Post date:** [October 19, 2023, 1:01pm UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/5 "2023-10-19T13:01:13Z")

</div>

I think I’ve faced this same problem before. If I’m not mistaken, it’s related to the quotes. They are necessary when there are spaces between caracters, but then the command doesn’t always work with the `Command prompt` acticity.

Try changing spaces for underscores in the directory (you have to actually change the names of the folders) and retry the command without quotes.

So instead of this:  
`cd “OneDrive - company\Internt\02_RPA_Prosesser\Python” && python getExcluds_final.py`

You change the names of the actual directory folders and try this:  
`cd OneDrive_-_company\Internt\02_RPA_Prosesser\Python && python getExcluds_final.py`

---

<div class="post-metadata">

**Author:** ![applePie](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@applePie](https://forum.electroneek.com/u/applePie)\
**Post date:** [October 19, 2023, 1:48pm UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/6 "2023-10-19T13:48:22Z")

</div>

Hi!  
Thank you for your answer, but sadly i cannot change the names as it is company One Drive and company folder names…  
I know i could move the .py script to local directory, but i do not want to do it as i need to keep the scripts on company cloud and be able to run it from any company PC ☹

---

<div class="post-metadata">

**Author:** ![cris-dsc](https://forum.electroneek.com/user_avatar/forum.electroneek.com/cris-dsc/32/768_2.png) [@cris-dsc](https://forum.electroneek.com/u/cris-dsc)\
**Post date:** [October 19, 2023, 2:00pm UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/7 "2023-10-19T14:00:01Z")

</div>

> [@applePie](#):
>
> C:\Program Files\ElectroNeek Studio Pro\Loader\getExcluds\_final.py

Maybe the problem is in this directory. I’ve never used a python script in ElectroNeek, so I don’t really know how it works…

---

<div class="post-metadata">

**Author:** ![Kudlappa\_Gouder](https://forum.electroneek.com/user_avatar/forum.electroneek.com/kudlappa_gouder/32/371_2.png) [@Kudlappa\_Gouder](https://forum.electroneek.com/u/Kudlappa_Gouder)\
**Post date:** [October 19, 2023, 3:31pm UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/8 "2023-10-19T15:31:44Z")

</div>

@applePie Does this command alone working fine?

1. cd OneDrive - company\Internt\02\_RPA\_Prosesser\Python  
Are you able to successfully change the Directory? Can you attach the .neek file please.

---

<div class="post-metadata">

**Author:** ![applePie](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@applePie](https://forum.electroneek.com/u/applePie)\
**Post date:** [October 20, 2023, 6:02am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/9 "2023-10-20T06:02:54Z")

</div>

I tried to upload .neek, but it gave me this error:

 ![image](https://forum.electroneek.com/uploads/default/original/2X/b/b58c6cded06f006317c4f16053ef6fe001bb3b71.png)

I tride zip file, but i got error that new users cant upload files

---

<div class="post-metadata">

**Author:** ![applePie](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@applePie](https://forum.electroneek.com/u/applePie)\
**Post date:** [October 20, 2023, 6:05am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/10 "2023-10-20T06:05:07Z")

</div>

When i navigate to folder it says it has been executed successfully. But when i tried to do two command prompet activities, it gave the same error as the double line seperated with &&.  
My .neek file is just the command prompet activity with the command. I just need the Electroneek to execute the python script for this flow.

---

<div class="post-metadata">

**Author:** ![applePie](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@applePie](https://forum.electroneek.com/u/applePie)\
**Post date:** [October 20, 2023, 6:05am UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/11 "2023-10-20T06:05:42Z")

</div>

yes, i think so, but i am not sure why it goes to this directory…

---

<div class="post-metadata">

**Author:** ![Avinash\_Rai](https://forum.electroneek.com/user_avatar/forum.electroneek.com/avinash_rai/32/734_2.png) [@Avinash\_Rai](https://forum.electroneek.com/u/Avinash_Rai)\
**Post date:** [October 30, 2023, 12:47pm UTC](https://forum.electroneek.com/t/multiple-commands-with-command-prompt/3525/12 "2023-10-30T12:47:11Z")

</div>

@applePie Can you plz create a ticket to further look into the issue?
