This Specification Task will run a Command Line Argument. If a result is generated, it can be returned to a Constant. If an error is generated, it can be returned to a Constant. A timeout can be set, after which DriveWorks will continue to run. If the timeout is reached before the Command Line has fully run, then it will not return a result or error string.
|Title||Changes the Title (not the name) of the task.|
|Command line arguments||Single string representing all of the Command Line Arguments required|
|Results Constant||The name of the Constant that any results string will be posted|
|Error Constant||The name of the Constant that any error strings will be posted|
|Timeout||Timeout in seconds, after which no errors or results will be returned, and DriveWorks will continue. The Command Line will still be executed|
When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.
|Property Name||Example Rule||Example Result||Meaning|
|Command Line Arguments||"/c notepad.exe C:\MyDocuments\Data\Details.txt"||/c notepad.exe C:\MyDocuments\Data\Details.txt||This will open up the Text file Details in Windows Notepad.|
|Results Constant||"DWConstantCommandPromtSuccess"||DWConstantCommandPromtSuccess||This is the name of the Constant to report to if the Command ran successfully.|
|Error Constant||"DWConstantCommandPromptFailure"||DWConstantCommandPromptFailure||This is the name of the Constant to report to if the Command fails to run.|
|Timeout||5||5||This is the timeout in seconds after which no errors or results will be returned.|
Here are a few examples for the Command line arguments property.
|/c "C:Program Files\CopyDocuments.bat"||Will run the batch file CopyDocuments from the command line when the task is run. Note quotes required when spaces exist in the path.|
|/c notepad.exe||Will run notepad.|
|/c notepad.exe C:\DriveWorks\Notes.txt||Will run notepad and open the text file named Notes.|
|"/c ""C:\DriveWorks\"&DWVariableProgramToRun&""""||Use this example when the name of the program to run is calculated from a variable. Note the opening and closing quote marks. Will run the program calculated from the variable ProgramToRun from the command line when the task is run. This property can be made Dynamic, allowing a variable to be selected from the Rules Builder.|
|/c echo hello world||Will return the string hello world.|