Exec binding - Windows parameters in Input problem

You don’t define it anywhere. You just have to add it to your command where it needs to go.

R:_OpenHAB_OpenHAB\conf\misc\string2file.bat %2$s

Pay attention to the examples in the add-on docs:

php ./configurations/scripts/script.php %2$s
 ...
// "%2$s" will be replace by the input channel command, this makes it possible to use one command line with different arguments.
// e.g: "ls" as <YOUR COMMAND> and "-a" or "-l" as additional argument sent to the input channel in the rule.
Thing exec:command:yourcommand [ command="<YOUR COMMAND> %2$s", interval=0, autorun=false ]

Before the command is called,. %2$s is replaced with what ever state the Item linked to the Input Channel currently has or the command that was sent to that Item.

Note the whitelist must match exactly this command so if you add the parameter you’ll have to update the whitelist too.

1 Like