Hello All,
I have designed an Automation, but it was based on the folder location in my PC(example accessing the excel in one particular file path in my PC ). I gave the published file to my friend to test and he cant use it as the folder is not available.
For example is username “C:\Users\USERNAME\Desktop\UiPath_Bot\FILENAME.nupkg”
Other is inside the automation selecting the folder to access the file automatically.
Is there any way in which I can make a general file or file path which can be used in different PC? Or how can I avoid using file path?
You can either use the folder within the project and put the file path as data/input/yourfile.pdf as example or if the process is downloading a file into let’s say the download folder you could assign a variable to:
Hello @iamNairda Thank you for quick reply. But Sorry I didn’t get the first line. My problem is I want that User first keep the file in particular folder. The UiPath code reads the folder and uses that file. Currently its managable in my PC as I have coded it but If the PC changes the user name and thus the file path changes.
Can you share an example if possible? what do you mean by “use the folder within the project”
With the "GetEnvironmentVariables you get the path “C:\Users\Username” in my case it would be “C:\Users\Adrian” as my Username is “Adrian”. Using this you can set any path that is always available on both machines. Like Documents or Downloads. Here’s a picture of how to build it: