Page 1 of 1

Powershell

Posted: 07 Sep 2020 20:22
by Soessafaria
Is it possible to trigger/launch a powershell script using the commands? For instance when I stop recording I trigger a powershell script that updates the recorded file to another folder or the cloud?

Re: Powershell

Posted: 07 Sep 2020 20:35
by radio42
Yes, see the control-commands in the Appendix of the User Manual.
For example see the EXEC_SHELL_COMMAND or EXEC_SHELL_COMMAND_SYNC command.

You can e.g. use the event system of the Mixer channel to trigger such command (right-click on the mixer channel name and select Edit Control Command Events...).

Re: Powershell

Posted: 07 Sep 2020 21:01
by Soessafaria
Ok, I am struggling to get it to work. Maybe it is a format issue

My call is now:
EXEC_SHELL_COMMAND Copy-Item C:\Users\Playout\Music\Interview.mp3 -Destination C:\Temp|normal


It does not work at the momennt, could you help me with it?

Re: Powershell

Posted: 08 Sep 2020 08:05
by radio42
Try:
EXEC_SHELL_COMMAND powershell.exe Copy-Item "C:\Users\Playout\Music\Interview.mp3" -Destination "C:\Temp"|normal

Re: Powershell

Posted: 08 Sep 2020 11:08
by Soessafaria
Still does not work. Could you give an example that does work? Maybe I can figure it out. Does it need any quotes?

Re: Powershell

Posted: 11 Sep 2020 08:07
by radio42
I corrected the above, it must actually be powershell.exe to start it.
Note, that the EXEC_SHELL_COMMAND effectively just launches any OS application, so the first parameter argument must be powershell.exe to start powershell itself and then followed by the command-line arguments to pass to that application.
E.g.:
EXEC_SHELL_COMMAND powershell.exe Copy-Item "C:\Users\Playout\Music\Interview.mp3" -Destination "C:\Temp"|normal

Re: Powershell

Posted: 25 Sep 2020 09:19
by Soessafaria
thank you, It works!