I am currently implementing a function to notify the destination of a folder where an error has occurred.
However, the path is the full path, and show the address. you will be known as shown below.
it is not good for a security point of view, I would like to prevent the hierarchy above “uipath” directory from being displayed.
Currently, the above full path is contained in a String variable. Is there anything I can do to make this variable not display the first two levels, or display it from the Uipath level onwards?
In addition to ppr’s method, you could use regex which might be a bit more resilient to changes in folder structure. Something like: (?<=\\uipath\\).* would grab everything after the uipath directory. So "uipath" + the regex would get you the full string after the uipath directory only