Name

CFEXECUTE — New as of ColdFusion 4.5

Synopsis

<CFEXECUTE> ... </CFEXECUTE>

Executes a command-line program on the server. No HTML or CFML should appear between the start and end of the CFEXECUTE tags, and CFEXECUTE tags can’t be nested. If for some reason an exception is thrown while attempting to execute the CFEXECUTE tag, the following rules apply:

  • If the application specified in the NAME attribute can’t be found, an “Application File Not Found” exception is thrown.

  • If the ColdFusion user executing the application doesn’t have permission to do so, a security exception is thrown.

  • If a value is specified for OUTPUTFILE, and the file can’t be opened, an “Output File Cannot be Opened” exception is thrown.

Attributes

NAME=" command "

The full path to the program you want to execute. Required.

ARGUMENTS=" argument_string "

Arguments to pass to the external program being called. Optional. Arguments can be either strings or arrays. On Windows platforms, a string is passed to the Windows process control subsystem for processing. On Unix and Linux systems, a string is tokenized into an array of strings, delimited by spaces. If spaces occur in the array elements, they are escaped by double quotes. On Windows platforms, the elements of an array are concatenated into a space-delimited string of tokens, which is then passed to the Windows process control subsystem for processing. On Unix and Linux systems, the elements of an array are copied into an array of exec( ) arguments.

OUTPUTFILE=" ...

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.