Dynamic file route

Hello Guys,
How can i make the file o a route dynamic, so it doesn’t matter in which machine it runs the process.
In my case i think the main issue is the machine name “FINSOCIAL”.


Hello @Luis_Fernando

You can keep a config file and store the file path over there.
Else you can create an orchestrator asset and keep the file path.
Else you can store the file in the project folder and no need to give the entire path. So who all are executing the process can execute it without changing the path.

for eg: Input/test.xlsx. where Input is a folder in the Project.

Hi @Luis_Fernando

You can have a Static Folder in all the Machines in any of the Common Drives and store it there.

or else you can have a Shared Drive Common with access to all the bot machine and store there.

or else you can have in your project also.

Thanks

The thing is that after creating the folder i have to move the downloaded file from de downloads folder to the created folder, so the route of the “from” property from the “move file activity” has to be also dynamic so every machine knows where to get the file and where to move it.
A friend told me that using the %userprofile% would work. That it’s supposedly equals to the mahine route that it’s put on. But still doesn’t seem too work as expected

Hello @Luis_Fernando ,

If you want to make the username dynamic, you can use the function system.Environment.UserName instead of the hardcoded value FINSOCIAL . The code would be like “C:\Users\”+ system.Environment.UserName+”\Documents…”

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.