I am currently working on a program that runs a UiPath bot to retrieve a file path and I would like to validate it if its correct. As sometimes it returns ‘C:\Users\Downloads\report.csv’ but sometimes it returns ‘C;\Users\Downloads\report.csv’. Hence, I was thinking of including a do while loop but I am unsure of what to set as the condition as the ‘report.csv’ part does not have a fixed name, it changes every time. Additionally, the file path is saved in a variable.
Do you have an idea how to incorporate this into a do while loop?
For example, the loop will check if the syntax of the file path is correct, if so, it will execute the next step. However, if the file path’s syntax is wrong, then it will rerun the entire flow…
The bot that I am currently creating will automatically refresh itself every 15 minutes. Sometimes, the file path typed by the bot, i.e. C:\Users\Downloads, might be typed as C;\Users\Downloads, which I have no idea why too.
Hence, I thought a do while loop will be good to check on whether the syntax of the file path is correct, otherwise my bot will fail. Or is there another way of doing this?
Once we get file path in variable before accessing the file path simply replace ; with :
If you have the special character ; it will automatically replace or it will not do anything. I think you need to go for while loop for this. Please try and let us know. Thanks.
If you still face issue pls share with us screenshot so that we would help you in better way. Thanks.