Error "Could not find a part of the path " thrown irregularly

Hey all,

Although there are a few topics already out there tackling this “could not find part of the path” error, my question is slightly different.
Since a week some processes I’m running with the “Directory.Get.Files” activity throw this error. But not each time the process is run. When simulating this situation in Studio (manually, attended) the error is also thrown, but not always. The problem doesn’t seem to be in the workflow - since the error isn’t throw each time - or in running processes unattended.

Any idea what it could be and how to tackle it?

Thank you in advance!

Hi @l.m.heuijerjans ,

Welcome to the UiPath Community !

I understand that you are getting this exception occasionally. Below are the Things to Try

  1. Before this activity of Directory.getFiles , use a add log Message activity and print the Path - This will print the path which the robot is looking for and in case of exception - Validate the logs for the Path

  2. Put this thing in a Try Catch Block - Exception handling -
    In the Catch section - Print the Path , Exception details and other Information which might Help.

Thanks
Mukesh

1 Like

Hey @mukeshkala,

Thank you for your quick response. Although those are very insightful tips (thank you!), the problem seemed to have resolved on it’s own. I’m afraid it had something to do with our own infrastructure, but what was causing the problem I will never know.

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