Page 1 of 1

TI ExecuteCommand double/single quote syntax?

Posted: Fri Sep 10, 2010 5:12 pm
by TM1modeler
Hi,

I'm attempting (and failing) to use ExecuteCommand in TI to run the following cmd line:

cmd /k "C:\Progra~1\modelerclient.exe -stream ""C:\Progra~1\streams\Sample_ForecastV2.str"" -PBeginDate=""1994-01-01"" -PEndDate=""1999-12-01"" -execute"

The above works via Windows Start\Run...

Below is the ExecuteCommand TI syntax. The .exe executes, process is visible in Task Manager. However it appears that the commands from '-stream' forward are not being passed correctly. I suspect it is double/single quote setup. Any thoughts?

S_Run = 'cmd /c "C:\Progra~1\modelerclient.exe -stream" "C:\Progra~1\streams\Sample_ForecastV2.str"" -PBeginDate=""1994-01-01"" -PEndDate=""1999-12-01"" -execute"';
ExecuteCommand(S_Run, 0);

Re: TI ExecuteCommand double/single quote syntax?

Posted: Sat Sep 11, 2010 10:37 am
by John Hammond
put your command in a .bat file that is in the current directory of the server . ExecuteCommand seems to be very inflexible and the way I get round this is to use .bat files.