Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | system(command) | Package | | Alias | | Pkg Usage | |
|
Description
Excerpt |
---|
|
Executes the command of the operating system. |
...
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
command | String | Yes | Valid Operating System command. |
|
Return Type
String []
The routine returns an array with 3 elements in such order:
The operating system exit code of the process being spawned (as string)
The output stream (limited to 4Kb) as a string
The error stream (limited to 4Kb) as a string
Examples
Let's create a file using system routine and windows command prompt:
...
Code Block |
---|
string testfolder="c: /tests /"; //assuming this path exists. //we assume in this path a file called `myexec.bat` has been previously created and contains one line `echo Hello;`
//now the following call will return `0.0|[THE_PATH_OF_EXECUTION]>echo Hello; Hello;|` return system ("C:/WINDOWS/system32/cmd.exe /c " + testfolder + "myexec.bat" ); |
Note
Note |
---|
For windows operating system, you should put the full (absolute) path of the command. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "system_routinesroutine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|