Coldfusion use cfexecute to execute server side executable

For Quite some time I was thinking of how we can execute any executables on the server. While browsing the net for coldfusion articles I am across cfexecute tag. So finally I got the tag which satisfy my needs.

We have some third party executables which converts our files into different format. But how to use this utility via web using coldfusion was question mark for us. Originally the idea was there in my mind about such kind of tag. Which I thought coldfusion must be offering, thats true it offered such tag. Coldfusion is Great!

We will like this.

-We will upload file on the server on to the specified url
-will use cfexecute command with script once the file is uploaded and will pass necessary arguments.

Cfexecute tag looks like

<cfexecute
name = ” Application Name ”
arguments = “arguments”
outputFile = “Output file name”
timeout = “Timeout interval”>

</cfexecute>

name :
attributes require the application absolute path which we want to execute at the server side.

arguments :
arguments required by the application eg filename and output file format

outputFile :
This dump the response messages into specified file. eg. File is successfully converted.

timeout:
This is the timelimit till the coldfusion server waits for the response from application.

You can find more information about the cfexecute at the livedocs.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: