Multiple commands with command prompt

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?

@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

1 Like

Hi, I tried that already and it didnt work…

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

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

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 :frowning:

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…

@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.

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

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

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.

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

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