Execute an operating system level command in the native shell. The binary must be in the PATH, or you can specify the full
path to it. This command will wait for the OS exectuable to complete but will flush the output as it is received.
.
{code:bash}
run myApp.exe
run /path/to/myApp
{code}
.
A shortcut for running OS binaries is to prefix the binary with "!". In this mode, any other params need to be positional.
There is no CommandBox parsing applied to the command's arguments. They are passed straight to the native shell.
.
{code:bash}
!myApp.exe
!/path/to/myApp
!dir
!npm ll
!ipconfig
!ping google.com -c 4
{code}
.
Executing Java would look like this
.
{code:bash}
!java -version
!java -jar myLib.jar
{code}
.
You can even call other CLIs
.
{code:bash}
!git init
touch index.cfm
!git add .
!git commit -m "Initial Commit"
{code}