RUN

RUN

Executes an operating system command.

Syntax

       RUN <CommandLine>

Arguments

<CommandLine> This is the command to be executed on the operating system level. It can be specified as literal or as character string in parentheses.

Description

The RUN command opens a new command shell and executes the operating system commands specified with <CommandLine>.

RUN does not return until <CommandLine> is completed by the operating system. When RUN is complete, the new command shell is closed.

Example

       // The example executes the DIR command, directs its output into
       // a file and displays the result with Notepad.exe
       PROCEDURE Main
          LOCAL cCommand := "Notepad.exe files.lst"

          CLS

          ? "DIR command"
          RUN dir > files.lst

          ? "Executing Notepad.exe"
          RUN (cCommand)

          ? "Done"
       RETURN

Seealso

( ), FUNCTION, PROCEDURE

2 responses to “RUN

  1. Pingback: Harbour Commands | Viva Clipper !

  2. Pingback: Harbour Statements | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.