Executes a ColdFusion developer-specified process on a server computer.
Extensibility tags, Flow-control tags
<cfexecute
name = "application name"
arguments = "command line arguments"
outputFile = "output filename" variable = "variable name"
timeout = "timeout interval">
...
</cfexecute>
cfcollection, cfindex, cfobject, cfreport, cfsearch, cfwddx
ColdFusion MX 6.1:
variable attribute.
outputFile attribute: if you do not specify an absolute file path in the outputFile attribute, the path is relative to the ColdFusion temporary directory.
| Attribute | Req/Opt | Default | Description |
|---|---|---|---|
|
name |
Required |
|
Absolute path of the application to execute. On Windows, you must specify an extension; for example, C:\myapp.exe. |
|
arguments |
Optional |
|
Command-line variables passed to application. If specified as string, it is processed as follows:
If passed as array, it is processed as follows:
|
|
outputFile |
Optional |
|
File to which to direct program output. If no If not an absolute path (starting a with a drive letter and a colon, or a forward or backward slash), it is relative to the ColdFusion temporary directory, which is returned by the |
|
variable |
Optional |
|
Variable in which to put program output. If no |
|
timeout |
Optional |
0 |
Length of time, in seconds, that ColdFusion waits for output from the spawned program.
If the value is 0:
|
Do not put other ColdFusion tags or functions between the start and end tags of cfexecute. You cannot nest cfexecute tags.
Throws the following exceptions:
The time out values must be between zero and the longest time out value supported by the operating system.
<h3>cfexecute</h3> <p>This example executes the Windows NT version of the netstat network
monitoring program, and places its output in a file. <cfexecute name = "C:\WinNT\System32\netstat.exe" arguments = "-e" outputFile = "C:\Temp\output.txt" timeout = "1"> </cfexecute>
ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting
Version 7
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000243.htm
Comments
cf_Amir said on Sep 28, 2005 at 10:21 AM : the_falling_frog said on Aug 31, 2006 at 1:13 PM : bizarrojack said on Sep 28, 2006 at 11:41 PM : bizarrojack said on Sep 28, 2006 at 11:59 PM : carehart said on Jan 17, 2007 at 10:16 AM : Steve Seaquist said on Feb 3, 2007 at 10:55 AM : Steve Seaquist said on Feb 3, 2007 at 11:02 AM :