cancel
Showing results for 
Search instead for 
Did you mean: 

Use Utility Environment Start Action as CMD

IshanMahajan
Level 7
Hi, 

I need to create folder using command line, though there are option available in Folder management, i want to utilize command prompt for it,
i want to send 'MD Test' as command and create this 'Test' folder, did any one tried it ? can you share how to send this command from Start Process Action ?

------------------------------
Ishan Mahajan
India
------------------------------
1 BEST ANSWER

Helpful Answers

JamesMarsh
Staff
Staff

You can use the "Start Process" Action within the "Utility - Environment" VBO for this below is an example of how this could be done. e.g.

Inputs: 

Application = "cmd.exe"

Arguments = ""/c if not exist ""c:\temp\bp-new-folder"" (mkdir ""c:\temp\bp-new-folder"")"

28550.png
Please note that the "Start Process" Action does not handle any exit codes


------------------------------
James Marsh
Technical Consultant
Blue Prism
Europe/London
------------------------------

View answer in original post

7 REPLIES 7

JamesMarsh
Staff
Staff

You can use the "Start Process" Action within the "Utility - Environment" VBO for this below is an example of how this could be done. e.g.

Inputs: 

Application = "cmd.exe"

Arguments = ""/c if not exist ""c:\temp\bp-new-folder"" (mkdir ""c:\temp\bp-new-folder"")"

28550.png
Please note that the "Start Process" Action does not handle any exit codes


------------------------------
James Marsh
Technical Consultant
Blue Prism
Europe/London
------------------------------

Thanks James!

------------------------------
Ishan Mahajan
India
------------------------------

Hi,
I used your method to run a python code. I don't need output into BluePrism. I passed arguments like this.


"python3" & """" &[script_file_path]&""""
this evaluated right. I am wondering Why it is not printed on the cmd screen.
Any Help will be greatly appreciated. All the other forms on this topic talk about using the code stage. I want to do it without using the code stage and application modeler. Is it Possible?
Any help is greatly appreciated.
Thanks in Advance

------------------------------
Morampudi Sowmya
------------------------------

I want to answer my own question. As passing through  arguments didn't work for me. I used a navigate stage and attached cmd to it. Yes I used Application modeler but all I did is to give the cmd location that's it.
To attach cmd you need give the window title parameter as
"*cmd*"
And through global send keys I passed the command and {ENTER}.

Thank you


------------------------------
Morampudi Sowmya
------------------------------

What's your scenario? I can't imagine a time where it's desirable to use global send keys with a command prompt window, other than just learning Blue Prism.

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Yes Dave, I just started learning Blue prism. In fact, I am on my trial version still. Would you mind telling me what would you do in such a scenario? 
BTW I follow your content on youtube. They helped me have a smooth blue prism journey. Thanks for the content.

------------------------------
Morampudi Sowmya
------------------------------

It depends on what you need to do. Sometimes it's a relatively simple thing such as trigger a .exe file to run and that's it. Sometimes you are triggering a .exe file and waiting for an output from it. I see you referenced Python earlier, so I assume you're looking to kick of a Python script. The Support Center isn't loading for me right now or I'd point you to an article there regarding kicking off Python from Blue Prism. I think Eric Wilson also has some blog content about that.

So, let me just start with this. Are you saying you tried using the Environment VBO's action "Start Process" or better yet "Start Process Read Stderr and Stdout" which can give you outputs from your command line call. And you mentioned that something wasn't printed out to the command window. A command prompt window will not necessarily pop up. Something you could do is add a pause command so that the window stays open, but I would assume that the window would close immediately by default once it's done with its task.

Glad you found the YouTube content helpful!

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company