clAlert  clDisable

Chapter 2: Bridged Functions

clCmd

Description

Executes the command line argument by passing an argument to a command processor, enabling such actions as wild card expansion and redirection for the function to act as if it was executed from the command line. This is similar to the UNIX system(3) command.

By contrast, clSystem() executes Cmdline without first passing it as an argument to a command processor.

NoteOn Windows, the command processor is cmd.exe, and on UNIX the command processor is /usr/bin/sh.

Syntax

clCmd (string Cmdline);

Parameter

Description

Cmdline

String that defines the command line instruction to pass to Windows. The instruction must be in the format expected by the Windows command line.

Return value

Integer.

Returns the 8-bit exit status of the command line program for success.

On UNIX, returns the negative value of the UNIX error number (as documented in the UNIX errno.h file), and on Windows, returns the 8-bit exit status of the command line program for failures.

Examples

Example 2

int rv;
rv = clCmd(“copy *.doc a:”);




Copyright © 2005. Sybase Inc. All rights reserved. clDisable

View this book as PDF