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>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.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