Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=system+-+15488215
widthauto

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

system(command)

Package

Alias

Pkg Usage

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

command

String

Yes

Valid Operating System command.

Return Type

String []

The routine function returns an array with 3 elements in such order:

...

Let's create a file using system routine function and windows command prompt:

...

Let's invoke a windows.bat script file using system routinefunction:

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" );

...