History |
Shell (general internal functions)
Purpose
Runs an executable program on the server.
Programs run on the server can have command line arguments passed to them, but no additional input can be provided to the running program.
Operating system shell commands can also be run from this function. Shell returns an integer value that is the command interpreter's error code. 0 indicates that the command interpreter was able to begin processing the request. Non-zero indicates an error.
The Spawn function has several advantages over Shell, and should be used in place of Shell where possible.
Syntax
Shell (StringExpression)
Example
Sub Main()
Dim rc As Integer
rc = Shell ("Copy C:\FCPO\LogFiles\*.* C:\Backup\LogFiles")
If rc = 0 Then
Print "Copy has started successfully."
Else
Print "Could not begin copy."
End If
End Sub
| ||||