EXEC Execute an external program |
Top Previous Next |
This script command executes a specified external program.
The /nowait option determines if the script file execution is suspended until the external program is complete or continues to run. If this option is omitted, script file execution resumes when the program terminates.
The /passargs option allows you to pass any number of variable or string values from the script file to the program to be executed as if they are specified on the Shortcut Target command line. Any variables or string values that follow the /passargs delimiter within the EXEC command line are passed in this way. Consider the following example.
SET program_name = "myprog.exe -abc" SET flag = "-xyz" EXEC program_name /passargs "-p2" flag
The effective command line to the program myprog.exe would be:
myprog.exe -abc -p2 -xyz
The exit value of the executed program is obtained by Robo-FTP when it terminates and it becomes the EXEC command’s result code. This result code may be useful in subsequent conditional branching tests in the script file.
This option permits an external program to deal specifically with a particular error condition that may be beyond the scope of a Robo-FTP script file.
Related Command(s): CALL, CHAIN, DOSCMD, WORKINGDIR Also: Script File Result Codes |