Relative path for materials

Hi,
I work as an interior designer at a small Architect firm. We have a system where we sync our folders online, but the synced folders will automatically have different paths since the computer name is different on each computer (for example C:\Users\Jonas_2\Datto Workplace\NEW ORDER\DATA\Rhino\MATERIAL, where Jonas_2 is my computer name, this is the only thing that differs in the path names). It works fine when referencing geometries from another folder and opening on another computer, but we still get the same question every time we open the file when someone has pointed the materials to a path with their username in it. It works great with the Bulk Replace command and just point to the root folder, in this case “Datto Workplace”, but it is a bit annoying to have to do it every time you open a model that someone else has been working on. Is there some way to set a relative path or to get the program to Bulk replace materials automatically?

I’ve had a similar problem in Grasshopper when working on my laptop with files saved on a shared drive on my workstation. My solution was to retrieve the file path of the current file using a C script. On the workstation the directory is C:\Users.… and on the laptop it would be a shared folder for example M:.…

    A = RhinoDocument.Path;

    B = System.IO.Path.GetDirectoryName(RhinoDocument.Path);

    C = System.IO.Path.GetFileNameWithoutExtension(RhinoDocument.Path);