SHELL

Synopsis
SHELL command
(SHELL command wait)
Description

Runs an input string as a shell command. Outputs TRUE if the command was executed, FALSE otherwise. If the command is a literal list in the instruction line, and if you want a backslash character sent to the shell, you must use \\ to get the backslash through Logo's reader intact.

The optional wait input controls whether FMSLogo waits for command to finish running before it runs the next instruction. If present, wait must be either TRUE or FALSE. When no wait input is given, SHELL does not wait for the command to finish.

If your command contains spaces in the file path to the executable, it's a good idea to put double-quotes around it, or else you may end up running the wrong program. For example, if a file named c:\Program.exe exists, then the following instruction runs c:\Program.exe with the command-line parameter Files\Audacity\audacity.exe:

SHOW SHELL [c:\\Program Files\\Audacity\\audacity.exe]

However, the following instruction always runs audacity.exe, regardless of whether c:\Program.exe exists:

SHOW SHELL [\"c:\\Program Files\\Audacity\\audacity.exe\"]

Example
SHOW SHELL [notepad c:\\test.txt]
true
SHOW SHELL [unknown-app c:\\test.txt]
false

SourceForge.net Logo