Run a Query script from the command line
All commands that run at the command prompt take precedence over the same commands that are already contained in the Query file.
Note: To ensure that the log messages are saved, set the Excel save option to Save at end of run.
You can run a Query script from the command line using this syntax (note that this works even if the data file does not exist):
"Winshuttle.Studio.Console.exe full path" -SapQuery -run"<Query script name with full path>" [parameters - optional]
Note: This command requires "Winshuttle.Studio.Console.exe full path" to be enclosed in double quotes. In addition, ensure that there is a single space between "Winshuttle.Studio.Console.exe full path" and "Query script name with full path".
For example, if you want to execute Sample.qsq in the default location at C:\MyDocuments\Winshuttle\Studio\Script\, the command line syntax is:
"C:\Program Files\Winshuttle\Studio\Winshuttle.Studio.Console.exe" -SapQuery -run"C:\MyDocuments\Winshuttle\Studio\Script\Sample.qsq"
This command launches Studio 12.x with the Sample.qsq file loaded and starts executing the Query script. You can test this command line operation by running this command in the Windows Run dialog box.
Command reference
Parameter | Description | Example |
---|---|---|
-drs | Set the run sheet |
-drs"SheetName" |
-alf |
Name of the auto logon credential |
-alf"W6r-someone-800" |
-arf |
Attach the data file with the posting results |
-arf"true" |
-dsw |
Disable the production server warning |
-dsw"true" |
-rfn |
Result file name |
-rfn"C:\Users\centraluser\Desktop\MM02.xlsx |
-eml |
Send notification email on schedule confirmation |
-eml"someone@winshuttle.com,someone@example.com" |
-irr |
If run reason is required or not |
-irr"true" |
-rsn |
Run reason |
-rsn"This is a demo run" |
-dsr |
Start Row |
-dsr"5" |
-rtv |
Run time variables |
-rtv"TableName.FieldName#Value1#Value2|Value3##Value4|Value5|Value6 |