Is there a way to batch edit the paths in my buttons to make them conditional?

Hi all, I'm wondering if there is a way to batch edit the patch used in my buttons.

Basically, I now find myself working both from my own personal laptop, as well as my work laptop which is connected to an intranet where I have access to certain files and databases that I require for my work.

I have my DOpus buttons all set up for my personal laptop at home, with shortcuts that go to various local folders as well as some cloud drive folders like OneDrive and Google Drive.

The upshot is that nearly everything that is available locally is also available when accessed via my work computer — expect by a different path.

I've manually edited a couple of my buttons to accommodate this with an @ifexists statement to determine which computer I'm on. Basically, is @ifexists "\\tsclient\" is TRUE I am connected to my work computer through remote desktop on my personal computer, and the button points to the appropriate path.

This works well, but I have a lot of buttons! Plus, I am occasionally connecting just to my work computer directly, which requires a different logical test.

So I'm wondering if there is any way to batch edit, like with a find and replace sort of function, all the existing paths with the conditional paths. Are these buttons saved in any way that's exposed through a text editor for instance?

Relatedly, if others have suggestions on a better way of dealing with this issue, I'm all ears.

Thanks!

Type /buttons into the path field and push return. It'll take you to where the toolbars are stored, and they're all in XML format which can be edited in a text editor. (Make a backup first!)

Using aliases for the paths may be easier than making all the buttons conditional. Then you can point the aliases at different folders on each machine, from one central place. You may find there are already aliases for many of the folders you want, too.

Perfect, that solves both.

I didn't see how to point an alias to different folders but replacing the actual OneDrive path with the /OneDrive as the stem works on both computers.

thanks!

You can point aliases at any folder you want. Just add/edit them in Preferences.

This works perfectly for the built in aliases for OneDrive and Dropbox, but for Nextcloud, where I have to create the entry, the path does not update according to where it's installed on my second computer. Described here.

The built-in aliases don’t need editing at all. They’re completely automatic.

Aliases you define yourself will need to be edited if the path you define on one machine needs to be different on the other. An alternative is to use environment variables, which are part of the Windows user profile and outside the Opus configuration. Or scripts which test the machine name to choose which path to use.