Nevermind, I got it to work.
When I read the file all the text in run in to each other. How can I put in
the proper carriage returns?
<cffile action="READ"
file="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#_.tmp"
variable="results">
<cfoutput>
#results#
</cfoutout>
At 11:32 AM 6/12/2002 -0400, you wrote:
>Hi,
>
>I have a problem. I'm running a executable using <cfexecute and everything
>is working great. The program creates an external file which has the
>display from the screen if run from the command prompt.
>
>I then use a <iframe and read in the external file created from the
>executable.
>
>This file is not required so then I do a <cffile and delete the temporary
>file. If I do this then I get an error from the <iframe.
>If I comment out the delete then it works OK.
>
>Why?
>
>How can I get around this problem?
>
>Here is my code:
>
><cfparam name="dir" default="#TheFolder#">
><cfdirectory action="LIST" directory="#dir#" name="dirlist" sort="name">
>
><cfoutput>
>
><cfset sr = #ListGetAt(FileName,1,'.')#>
><cfset CreateBatch =
>"setlocal#strCR##LCase(ListGetAt(TheFolder,1,':'))#:#strCR#cd
>#TheFolder##strCR##ComposeExe#
>#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))# printer">
><cffile action="WRITE"
>file="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#.bat"
>output="#CreateBatch#" addnewline="Yes">
>
><cfexecute name="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#.bat"
> outputfile="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#.rlog"
> timeOut="1000">
></cfexecute>
>
><!--- _.TMP FILE IS GENERATED BY THE EXECUTABLE FILE --->
><iframe src="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#_.tmp"
> name="LogFile"
> id="LogFile"
> width="100%"
> height="320"
> align="middle"
> class="dirlinks">
></iframe>
>
><cffile action="DELETE"
> file="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#.bat">
>
><cffile action="DELETE"
> file="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#_.tmp">
>
><cffile action="DELETE"
> file="#TheFolder#\#LCase(ListGetAt(FileName,1,'.'))#.rlog">
>
></cfoutput>
>
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists