Hi, i am new to Uipath and was just wondering, is there a way that i can find a specific folder and it’s path? After finding the path to the folder, i would like to assign the path to a variable and use it in a type into activity.
I noticed that there are a lot of post relating to this question but i am unsure which one is relevant to my question. If there are post similar to my question above i would be grateful if you could link it to me.
I have a couple questions,
How do you want to look for this folder, do you already know the name of the folder? Are you looking for a folder with a specific file inside that you have the name of? How exactly do you know what folder or location you are looking for? Or do you just want to save a specific file path that you already know to a variable? Do you expect the file path to change?
I just want to be more clear about the process so I can hopefully give a better answer to your question.
so for my particular use, i already know the name of the folder. But for my scenario, my script may be deployed to other machine’s as well. However, the folder name in all the other machine is the same. For instance, lets say the folder name is “example”. I was just wondering if i am able to find the path to the “example” folder and assign it’s path to a variable for later use. This “example” folder would also be present in other machine, but may be at different directory. Is there a way to just find the path to this folder regardless?
Let me just preface this by saying this is possible, however probably not in the best way or in the way you are thinking. You must have any part of the file path, the more specific (aka more that you can make static) the better.
This is because to do what you are asking we need to loop through all subfolders from the starting file path given until we find a match. As far as I know this is the only way to do what you want. It would be a bit complicated as you would need to compare the last folder in the file path to the folder name you are looking for and every other folder would need to be ignored. Depending on the number of sub folders/files, this operation could also take some time which could slow down your workflow. If you can mostly standardize or find a way to set the file path with variables that can change based on each pc this would be better.
I hope that there is a better solution, and I will try to think of one and look on the forums, but I believe this is the only way to do what you are asking. If you are having trouble picturing what I am describing, I’ll try to build a small workflow sometime when I have a bit of extra time.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.