Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

running a bat file from cold fusion

Posted on 2002-04-11
2
Medium Priority
?
866 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 100 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

670 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