Feature Request: Settings Folder as variable

a very small feature request: I’d like to have the path to the current Cantabile settings folder as a variable. Alternatively / additionally the name of the current Cantabile configuration.

Background: I use automated scripts on Cantabile shutdown (triggered by background rack bindings) to copy the plugins.json file from my settings folder to my dropbox, in order to do some comparison of installed plugin versions. But since I regularly switch between three configurations of Cantabile, this only really works for one of them, since I can’t tell Cantabile’s background rack which of the plugin.json files to copy within the script. So I’d love to be able to tell my script which of the three folders to copy from.

@brad: what do you think?

1 Like

Should be pretty easy - I’ll try to get to it early next week.

Implemented in build 4334 as $(AppSettingsFolder) and $(AppConfigName).

1 Like

Hi Torsten,
I would like to do something similar. I assume you’re using a PowerShell or batch file to copy the files?
How does your script reference the Cantabile variables?
Thank you - David

Using a simple Windows batch file (.cmd) with a command-line parameter. The batch file has one single line:

copy %1 C:\Users\torst\Dropbox\LiveSoftware\PluginVersionChecker\LiveCube.json

%1 refers to the first command line parameter passed to the script by Cantabile

The Cantabile binding looks like this:

with the “Command” field containing:

C:\OnCantabileShutdown.cmd "$(AppSettingsFolder)\plugins.json"

This passes the location of the relevant file to my command script as its first parameter. Just make sure you enclose the whole expression with quotes, since the path to the Cantabile settings folder will typically contain spaces.

Cheers,

Torsten

1 Like

Thank you Torsten!