Commands and Statements

Command RUN Foundation

Executes an operating system command or a program.

Syntax
RUN | ! <cCommandline>
Parameters
<cCommandline>
<cCommandline> contains the command or expression to execute at the operating system level. It can be specified as a literal or as a character expression in parentheses.
Description

This command exists only for compatibility reasons and should no longer be used. The two functions RunShell() and RunRexx() should be used instead.

The ! form of the command RUN also exists only for compatibility reasons and should no longer be used.

The command RUN starts a new command processor and passes the argument <cCommandline> to it. This argument is valid only for the new process and not for the process of the Xbase++ application. A typical use of RUN under DOS (Clipper) was changing the current path, for example:

RUN cd \XPP\SOURCE\SAMPLES 

This use of RUN is not possible under 32bit operating systems (Xbase++), since the path would be changed only for the new process. To define the path or the drive for the process of the Xbase++ application, the function CurDir() or CurDrive() must be used.

Examples
Format a disk

// The example uses the RUN command to format a disk 
// from within an Xbase++ application 

PROCEDURE Main 

  RUN Format a: /F:1.44 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.