Solved

running a bat file from cold fusion

Posted on 2002-04-11
2
848 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Google Crawl Errors Producing 404 Errors 4 88
CFFILE upload help 98 209
AWS Advice on using WHM/cPanel 1 96
Problem to copy file 14 92
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…
What You Need to Know when Searching for a Webhost Provider
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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