CMD - Execute Another Program or Command

Syntax


CMD

command-line


Operands


command-line

The command line to invoke the new program as it would be entered to the system CMD processor.


Description


The CMD command will issue the command to start the named program or command.  It does not wait for completion of the program nor check for successful completion status.  Because CMD calls the Windows CMD.EXE program, any Windows command-line command, like DIR, can be directly issued, like CMD DIR.  If the command-line has options, you can type them directly as you would on a Windows command line without requiring quotes, like CMD DIR C:\MYPATH\ABC.*.


The CMD command uses the same PATH environment variable value as Windows does in determining where the command being run is located.  If your program or script is in a directory named by the PATH, you do not need a fully-qualified command name.  Otherwise, it must be properly qualified in order to be found.


If you are unsure of the contents of the PATH environment variable, you can issue the command CMD SET PATH from SPFLite, and it will display the PATH in effect for the CMD command.  Press Enter when you are finished looking at the output to return to SPFLite.


When the CMD command is issued, SPFLite must determine the location of the current working directory - the directory used to locate data files (not executables or scripts) that are not specified as fully-qualified file names.  It does this as follows:



Any path-dependent or unqualified file names used in the command should take this into account.  


Command Window Closing


You may control whether the command window opened by the CMD command remains open at the completion of the command.   There is an option under Options => Submit which allows you to specify your choice.  In the CMD parameters box on the Submit tab enter /C to close the window on completion, or /K to keep the window open.



Created with the Personal Edition of HelpNDoc: Write EPub books for the iPad