Restoring a specific backed-up configuration using a command


I'm trying to create a dropdown menu with two buttons that restore one settings configuration each. The configured preferences for both are identical with the only differences being that one configuration has "Don't Replace Explorer" for the Win+E and "Explorer Replacement" preferences and the other has "Replace Explorer for All System Files" and "Bring the last active Lister to the front (new Default Lister if no Listers open)" enabled.

My use case is that I want to be able to quickly switch between using Explorer as the default file manager and Opus as the default file manager.

Does anyone have suggestions on how to accomplish this?

You can use the Prefs command to restore a config backup. See the BACKUPRESTORE argument for details.

But remember that it's going to affect more than just one setting, so any changes you make to your configuration after making the backups will be lost when you restore the backups.