BAT FILE EXECUTION using Uipath

Hello

I wanted to know if I can pass variable value inside bat file.
E.g. I wanted to run a process with bat file having % to dynamically change values inside the executable bat file.

Hi @icehouselux
welcome to forum
You can try to execute bat file using start process activivty and there u can pass arguments there

Regards
Nived N
Happy Automation

1 Like

i tried but it doesn’t seem to work
image

I am trying to create a folder with folder name coming as an argument

any reasons why not the uipath create folder activity is used?

https://docs.uipath.com/activities/docs/create-directory

I am just testing something to see if I can pass arguments inside a bat file. This is just a test for that

@icehouselux
give a try on following:
grafik
filename: FullFilePath of the bat file
Arguments: Your arguments

a bat with following content:
echo hello %1
Pause

was invoked and showed folloing result:
grafik

However maybe a look to the invoke powershell could be an alternate to check for

Kindly note:

  • PAUSE was just use to inspect the result
  • @echo off will surpress the command repetition
1 Like