Solved

running a bat file from cold fusion

Posted on 2002-04-11
2
809 Views
Last Modified: 2013-12-24
Hi,

I need to run a batch file from cold fusion.
Say I have a bat file named boo.bat
I want to be able to run it with an argument like
boo.bat Test1
This will create a
Test1.reg file
I want to run this as well, the same as I would run it from a dos prompt.
Thanks.
0
Comment
Question by:simi
  • 2
2 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 25 total points
ID: 6934445
You can only run Batch files on the server.  And to accomplish that use CFEXECUTE

http://livedocs.macromedia.com/cf50docs/CFML_Reference/Tags17.jsp

This was introduced in CF 4.5

Basic version:
<cfexecute
name="c:\boo.bat"
timeout="15">
</cfexecute>
Then run
<cfexecute
name="c:\Test1.reg"
timeout="15">
</cfexecute>



CJ

0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6934913
Glad I could help.. Thanx for the "A".
0

Featured Post

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Redirect website ! 4 51
PHP in Apache server 20 81
PHP Register global 21 64
Web server settings related to keepalive 1 78
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now