I am currently working on a project.
In this project after login to the web application I need to download the excel files.
after downloading the downloaded excel will save in my current local system path like,
Now I need to run the code in bot machines,
so the default download path will be change i.e.
I mean that the download path is dynamic so I need your help to handle this scenario, please do the needful.
Hey @Vrishchik ,
Give a try to this
Have you tried with Path Exist activity
Path Exists activity is used to check whether a file or folder exists in a specified path.
This activity returns a Boolean value of “True” or “False” based on whether the specified path exists or not
In the chrome you can set it up
Or else try with this expression for dynamic
Hi @Vrishchik ,
May I know, on what criteria you are saving in the BOT1,BOT2 etc?
I mean I am currently running the code in UAT environment till now I was working in my local system.
In my local system it is default download path is C:/Users/Naveen/Download.
Which I am mentioned the same in asset as well i.e(C:/Users/Naveen/Download.)
But when I run the code in UAT environment the default download path will be change because it is not my local system, so the download path will be differ In UAT environment. I am running the multiple bots.for example bot1,bot2 etc
so the download path should be C:/Users/BOT1/Download
Hi @Vrishchik - There are different ways to maintain these folder paths. Let’s see the first two easier methods
- Sounds like multiple bots are trying to read the same folder path, then you can use Assets in Orchestrator to maintain the folder paths, which provides the feasibility to share the data across the bots
Note: The Asset value has to be changes based on the environment. If this is not possible, then take a look at the 2nd method
- You can use the below exp within your code
Variable of type String Output = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & "\Downloads"
OK @Vrishchik ,
In this scenario it won’t be good choice to store it in the assets because it is dynamic, hence you need to declare it in the code only.
The below expression will give you the relative path related to the current user logged into the system(User name will change accordingly), in your case it might be BOT1, BOT2 etc.
Assign a variable with the below expression in the init state/beginning and pass it across the process.
@Vrishchik - Did you try using the above expression. Let us know if you face any issues.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.