num-var = SPF_Shell([{SYNC|ASYNC},][{HIDDEN|NORMAL},]cmd-str [,cmd-str] ...)


Operands:

SYNC  |

ASYNC

This optional operand indicates how you want the command to run. If SYNC is coded, control will not be returned to the macro until the command is complete. If ASYNC is coded, the command will be issued and control immediately returned to the macro.



HIDDEN  |

NORMAL

This optional operand indicates whether you want the command to run in a visible window or not. If HIDDEN is coded, no window will be seen. (And if errors occur, they will not be visible either)  If NORMAL is coded, the command will run in a normally visible command window.



cmd-str

the command you wish executed by the CMD.EXE shell. When multiple strings are provided as operands, they will be concatenated together with a single blank between the operands.


Returns:


RC will be set to the return code from the Shell function. This value will also be returned in num-var.

Msg$ will be set to "" (null).


Special Notes:


Both SYNC|ASYNC and HIDDEN|NORMAL are optional operands, and if omitted, SYNC, NORMAL will be assumed.


NOTE: If you want to specify the HIDDEN|NORMAL operand, you MUST specify the SYNC|ASYNC operand as well, it can not be omitted.


The cmd-string expression is passed as a Windows system command to the Command Shell. The command will be performed, and control returned. RC will be set to the Errorlevel / Exit code issued by the specified command. The function SPF_Quote$ may be of assistance in creating properly quoted operand values.


SPF_Shell can be used for entering Windows shell commands like DEL, MKDIR, RMDIR, etc. 

Because such commands can be powerful (including commands that may delete files), care should be taken to issue these commands correctly.


Created with the Personal Edition of HelpNDoc: Benefits of a Help Authoring Tool