Invokes the command interpreter
Shell t
x% = Shell(t)
t:sexp
x%iexp, return value
Shell runs the command interpreter and so enables execution of DOS commands from within a GFA-BASIC 32 program.
Shell "CHKDSK a: /f" //tests the disk in drive A:
Shell "command.com" // invokes Command.Com (Windows 9.x)
Shell "cmd" // calls cmd NT, 2000, XP
Dim x% = Shell("Dir /4 | More")
Debug.Show
Debug.Print "Return value of Shell = ";x%
With Open "CONOUT$" For Output As and AllocConsole() a command console can be opened and gives the application access to the input and output in the console. See Open.
Exec, ShellExec, System, WinExec
{Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}