Name

cfexecute

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=" output_file "

The path ...

Get Programming ColdFusion MX, 2nd Edition 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.