[thelist] Pause In Cold Fusion

Josh Spiegel joshsquared at yahoo.com
Tue Jun 12 11:16:40 CDT 2001


> Lets say I want to write a file and then read it on the same cold fusion
> page.  When I do this it gives me a can not access file because
> it is in use
> error.  This is because it trys to read the file while the above code
> (cfexecute not cffile) is writing to the file.  I can get around this by
> creating a loop in between that creates a slight pause in the
> logic.  I was
> wondering if anybody knows a better way to do this.

--- Here is a clarification of my problem ---

My problem is that the writing that is done to the txt file is not done by
CFFile.
Here is my code.

<CFOUTPUT>
	<CFEXECUTE name="c:\Imail\adduser.exe"
				arguments=" -u #form.account#"
				outputfile="emailOut.txt"> <!--- the executable is writing to the .txt
file --->
	</CFEXECUTE>
</CFOUTPUT>



<!--- Now while the executable is still writing coldfusion tries to open the
file.  It has done its job by calling the executable and begins to move down
the code.  It does not know that it needs to wait for the executable to
finish.  Ofcourse this all happens in fractions of a second.  So is there a
good way to make a fraction of a second pause so the executable can
inish.  --->

<CFFILE ACTION="Read"
    FILE="emailOut.txt"
    VARIABLE="Message">

Thanks,
Josh

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Raymond Camden
Sent: Tuesday, June 12, 2001 11:07 AM
To: thelist at lists.evolt.org
Subject: RE: [thelist] Pause In Cold Fusion


I'm not sure what you mean. I have no problems writing to a file and then
reading it.

<CFFILE ACTION="Write" FILE="e:\web\testingzone\test.txt" OUTPUT="Ray">

<CFFILE ACTION="Read"  FILE="e:\web\testingzone\test.txt" VARIABLE="Test">

<CFDUMP VAR="#Test#">

This works just fine. It displays Ray on screen. (If you don't have CF5,
change CFDUMP to <CFOUTPUT>#Test#</CFOUTPUT>)

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email   : jedimaster at macromedia.com
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of Josh Spiegel
> Sent: Tuesday, June 12, 2001 11:53 AM
> To: thelist at lists.evolt.org
> Subject: [thelist] Pause In Cold Fusion
>
>
> Lets say I want to write a file and then read it on the same cold fusion
> page.  When I do this it gives me a can not access file because
> it is in use
> error.  This is because it trys to read the file while the above code
> (cfexecute not cffile) is writing to the file.  I can get around this by
> creating a loop in between that creates a slight pause in the
> logic.  I was
> wondering if anybody knows a better way to do this.
> Thanks,
> Josh
>


---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





More information about the thelist mailing list