How to run a batch file in UIPath?

studio
batch

#1

Hi Everyone,

Actually i was looking for a batch File process automation.Can anyone please provide me with a simple small demo of it?

And I am creating a Batch File for Simply creating a folder 3-4, but i am saving that bat file as “D:\UI Path Project\BatchFile\s.bat”.

Then My UI Project available folder was “
C:\Users\ravi_d\Documents\UiPath\Calculator\BatchFile.xaml” .

i am using the control START PROCESS
set as - File Name : “C:\Windows\System32\cmd.exe”.
Arguments : “D:\UI Path Project\BatchFile\s.bat”.
Kindly help me


#2

Hi @RaviDevaraj,

Please try with the below collection of parameters.

FilePath: "D:\UI Path Project\BatchFile\s.bat"
WorkingDirectory: "D:\UI Path Project\BatchFile"
ArgumentList: Provide if you want to pass any runtime argument to the bat script

Regards,
Shiju Mathew


#3

Hi@shiju Mathew

Thanks for your Idea it’s great working now for me.

But one queries in this for me, its argument List only .
i don’t have any knowledge about that control can you please illustrate that topic to me

Regards,
Ravi


#4

Hi @shiju Mathew,

Thanks for your Idea it’s great working now for me.

But one queries in this for me, its argument List only .

i don’t have any knowledge about that control can you please illustrate that topic to me.

Thanks & Regards,

Ravi.D


#5

Hi Ravi,

For example I want to pass the startdate and enddate to the bat file, which downloads few attachments in this date range

image

In the .bat file, we can then make use of the arguments passed as below,
java -jar ReportDownload.jar %1 %2 (%1 is the placeholder for startDate and %2 for the endDate)

Regards,
Shiju Mathew


#6

HI @shijutmathew,
thanks for idea
i have one question or another idea for me

instead of adding a bat file ,i can use the robotic or robotic process to do that action (Bat file action)
it is possible?


#7

Hi @RaviDevaraj,

Yes, ofcourse depending on the action you want to do. I think you mentioned that your current bat file is to create some folders. You can use uipath activities and work flow to achieve the same.
Regards,
Shiju Mathew


#8

Hi @shijutmathew,

Now i am already creating a bat like that only. for example, using mkdir command i am creating a 3 folder that’s it

this things how can i use the robotic commands ?

i don’t have any idea regarding that ?
Can you illustrate that information to me.


#9

Hi,

There are activities for creating directory, you can search for it in Activities panel in Studio.

Regards,
Shiju Mathew


#10

hi @shijutmathew

ya ok i got that point

Thank you so much

i have one doubt?

Can you find the below screen.in that i am hitting a import button it takes few minutes or hour or hours also
After completed the import process the "import Process completed " message will come until i need to wait in that screen itself .

after that when this message came "import message completed " and Finish button also enable then only my next trigger need to start

For that what control i need to use ?
see the screenshot 1 and 2.