You dont need to write a batch file for shell commands like dir aka, commands that don't REALLY exist... heh
pass them as arguments to cmd.exe <cfexecute name="c:\path\to\system32\cmd.exe" arguments="/c dir c:\some\dir" variable="dirresults" /> -----Original Message----- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 24, 2007 4:18 PM To: CF-Talk Subject: RE: Using CF to run BAT files If you are trying to run commands that don't really exist, then you need to create a BAT file to run them. For example, if you want to do a DIR of a directory, you can't just run DIR since it doesn't exist. However, you can wrap it in a BAT file and run the BAT file with no problems. (I'm using DIR as an example, I forget the actual command I was trying to use when I found out the hard way.) M!ke -----Original Message----- From: Ben Forta [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 24, 2007 3:03 PM To: CF-Talk Subject: RE: Using CF to run BAT files Yes, that will work, but you will likely need to fully qualify the path of the executable: <cfexecute name="c:\windows\system32\ping.exe" arguments="localhost" timeout="30" variable="data" /> <cfdump var="#data#"> --- Ben -----Original Message----- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 24, 2007 2:03 PM To: CF-Talk Subject: RE: Using CF to run BAT files I was hoping that there were some way of running the ping command and stuffing the screen results into a variable. Shouldn't something close to this work? <cfexecute name="...ping.exe" argument=www.google.com variable="pingStuff" /> <cfoutput>#pingStuff#</cfoutput> -------------- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267550 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

