If you're running the command from the command line, you don't need the /C.
/C is not a switch of "copy," it's a switch of "cmd."

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Rick Faircloth [mailto:Rick@;GoLibertyOnline.com]
> Sent: Thursday, October 24, 2002 12:38 PM
> To: CF-Talk
> Subject: RE: Using CFEXECUTE from a Web Browser???
>
>
> You're right, Dave...
>
> When I ran it from the command prompt, it said 1 file(s) copied,
> but no printer response.
>
> Interestingly enough, when I used the /c in front of the copy... part
> of the command (without any quotes anywhere in the command line)
> I got this error from the system:
>
> '/c' is not recognized as an internal or external command
> operable program or batch file
>
> When I ran it without the /c it gave the 1 file(s) copied, response.
>
> However, when running the same command from the .cfm page,
> it would return the following error without the /c in the code:
>
> Timeout period expired without completion of
> C:\WINNT\system32\cmd.exe copy
> C:\Inetpub\wwwroot\cfdocs\printtest\CFLoop-OutputReservationCalendar.txt
> LPT1
>
> Suggestions?
>
> Rick
>
>
>
> -----Original Message-----
> From: Dave Wilson [mailto:dave@;autosdirect2u.com]
> Sent: Thursday, October 24, 2002 12:08 PM
> To: CF-Talk
> Subject: RE: Using CFEXECUTE from a Web Browser???
>
>
> I dont think the issue is with CF at all Rick. Like you say, you got the
> response:
>
> 1 file(s) copied
>
> Which means the file was dumped to the port (LPT1). My suspicion is that
> your printer (or print drivers) simply wont support this type of
> print job.
> Try running the print dump directly from a cmd prompt to see if it works
> that way. I did this on a machine here with a little Epson inkjet printer
> attached and although the printer activity light luminated, the job itself
> didn't print.
>
> HTH,
> Dave
>
>
> -----Original Message-----
> From: Dave Cordes [mailto:davecordes@;charter.net]
> Sent: 24 October 2002 17:01
> To: CF-Talk
> Subject: RE: Using CFEXECUTE from a Web Browser???
>
>
> I got the same response but a barcode printed on my thermal printer using
> the following code.
>
> <CFEXECUTE NAME="C:\WINDOWS\system32\cmd.exe"
>       ARGUMENTS="/c copy C:\Inetpub\wwwroot\CFDEV\barcode\zebra.txt LPT1"
>       TIMEOUT="5">
> </CFEXECUTE>
>
> I'm running ColdFusion MX so I'm not sure if 4.5.2 would work. I think it
> should though.
>
> Dave Cordes
> Senior ColdFusion Developer
> 636-939-1081 (H)
> 636-578-4235 (M)
>
> -----Original Message-----
> From: Rick Faircloth [mailto:Rick@;GoLibertyOnline.com]
> Sent: Thursday, October 24, 2002 11:02 AM
> To: CF-Talk
> Subject: RE: Using CFEXECUTE from a Web Browser???
>
>
> I tried running this code and got this response in the browser...
> (Windows 2000 Pro, CF 4.5.2)
>
> <CFEXECUTE NAME="C:\WINNT\system32\cmd.exe"
>            ARGUMENTS="/c copy
> C:\Inetpub\wwwroot\cfdocs\printtest\CFLoop-OutputReservationCalendar.txt
> LPT1"
>            TIMEOUT="30">
> </CFEXECUTE>
>
>
> 1 file(s) copied.
>
> But nothing happens with the printer. (Yes, the printer's on.  :o)  )
> Does this work with CF 4.5.2?
>
> Rick
>
>
> -----Original Message-----
> From: Dave Cordes [mailto:davecordes@;charter.net]
> Sent: Thursday, October 24, 2002 11:34 AM
> To: CF-Talk
> Subject: RE: Using CFEXECUTE from a Web Browser???
>
>
> Jochem,
> You are the man! That works like a charm. I guess the "/c" was the whole
> difference.
>
> And it works when ColdFusion is logged in as "Administrator" AND as "Local
> System Account".
>
> Very cool.
>
> Dave Cordes
> Senior ColdFusion Developer
> 636-939-1081 (H)
> 636-578-4235 (M)
>
> -----Original Message-----
> From: Jochem van Dieten [mailto:jochemd@;oli.tudelft.nl]
> Sent: Thursday, October 24, 2002 10:19 AM
> To: CF-Talk
> Subject: Re: Using CFEXECUTE from a Web Browser???
>
>
> Dave Cordes wrote:
>
> > Windows XP
> > ColdFusion MX
>
> OK, so your process will always run for as long as the timeout specified.
>
> > What did you mean by the "/c" parameter? Should I add that command in
> > order to close the command?
>
> Yes. But I usually make it the first option I specify:
> <CFEXECUTE NAME="C:\WINDOWS\system32\cmd.exe"
>    ARGUMENTS="/c copy C:\Inetpub\wwwroot\CFDEV\barcode\zebra.txt LPT"
>    TIMEOUT="5">
>    </CFEXECUTE>
>
> Jochem
>
>
>
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to