• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

12. Manipulating Files and Directories > 12.4. Executing Command-Line Programs

Executing Command-Line Programs

You can use the cfexecute tag to execute command-line programs residing on the same machine as the ColdFusion Application Server. This tag allows you to call external programs, such as batch utilities, from within your ColdFusion application. The following syntax calls an external program using cfexecute:

<cfexecute name="path_to_program_to_execute" 
           arguments="argument_string"
           variable="variable_name"
           outputfile="path_to_output_file"
           timeout="timeout_in_seconds">
</cfexecute>

The name attribute is required and specifies the full path, including filename, to the file you want to execute. Depending on the program you are attempting to execute, you may be able to specify just the program name without the full path.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint