Custom Activity. Problem with getting file path

Hi, I’ve created a custom activity to create a text log file and published it. The activity requires creating the logfile in the project folder, I tried using environment.currentDirectory or directory.getCurrentDirectory to do so, but when the activity is run, the file path that it locates is not the directory of the project folder, but the directory where the nuget package is at. How may I remedy this issue?

For example: the log folder is created in this area instead of the main project folder
image

The best to handle file path to create folder in C:\Temp location. All other dependencies and complexity go away with this.

You could change the activity to have the path as an in argument instead, that way you could take the current directory from the Uipath project.

1 Like

Thanks! Yup I did that and it works!:slight_smile:

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