Get directory path on different machines

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

C:\users\riley\onedrive\uipath\filename.xaml

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

C:\users\team-member-name\onedrive\uipath\filename.xaml.

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

C:\users\team-member-name\desktop\sharedfiles\uipath\filename.xaml

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:

Alternatively:
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.