> Has anyone ever tried to use CFEXECUTE to execute a
> command?

> <CFEXECUTE NAME="C:\WINDOWS\system32\cmd.exe"
>       ARGUMENTS="copy zebra.txt LPT1"
>       TIMEOUT="5"></CFEXECUTE>

> We're trying to print barcodes from a Web browser and have
> been having lots of problems. All it does is times out.

> I can go to a command prompt and type in "copy zebra.txt
> LPT1" and it works fine.

> How can I do this using CFEXECUTE?

try

<cfexecute name="copy c:\path\to\zebra.txt lpt1" timeout="5"></cfexecute>

cfexecute accesses the operating system in much the same way cmd.exe does,
so at that point, cmd.exe is superfluous in your name attribute. You do need
to bear in mind, however, that any DOS commands you execute this way will be
relative iirc from the root of the operating system drive, i.e. from c:\ ...
so any batch files you need access to, etc. will need to be in that root or
will require full paths to files or will require entries in the path in your
autoexec.bat

hth

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to