Get directory path on different machines

I have a UiPath file that lives in OneDrive at, for example


This OneDrive directory is shared with someone else, where the same xaml file lives on their computer at


The first part of the that is arbitrary: it could be


but the uipath\filename.xaml is consistent, because uipath contains excel files that the xaml references (this is the directory that is shared).

I have used the Special Folders activity in the past get Desktop etc. Is there something similar to get “this” or “current” directory that will work on different machines with different paths?

I have also read this and am dissatisfied with the solution. There must be a better way!

Have a look at this:

use the Directory.GetCurrentDirectory, use this in an assign activity it will give the full path to the current directory.

@rileypetersen if you don’t mind getting the file using an internet connection, you can always use the UiPath.MicrosoftOffice365.Activities package, which includes an activity for downloading files from OneDrive.