<!--- Read the contents of C:\AUTOEXEC.BATCFUSION\CFDIST.INI into a variable
 (cfdist) for processing -CFDIST.INI is a configuration file that
is optionally used to allow the ColdFusion server 
--->

<CFFILE ACTION="READ" FILE="C:\CFUSION\CFDIST.INI" VARIABLE="cfdist">
<!--- modify the contents of the variable --->
<CFSET HEADER="; File Modified using ColdFusion 5.0 on: ">
<CFSET HEADER=HEADER & DATEFORMAT(NOW(),"MM/DD/YYYY") & " at ">
<CFSET HEADER=HEADER & TIMEFORMAT(NOW(),"HH:MM:SS") & CHR(13) & CHR(10)>
<CFSET CFDIST=HEADER & CFDIST>
<!--- Write the contents of the variable back out to disk --->
<CFFILE ACTION="WRITE" FILE="C:\CFUSION\CFDIST.INI" OUTPUT="#cfdist#"
ADDNEWLINE="NO">
<HTML>
<HEAD>
<TITLE>Listing 35.2 - CFFILE READ/WRITE Example</TITLE>
</HEAD>
<BODY>
C:\CFUSION\CFDIST.INI has been modified, as shown below:
<PRE>
<CFOUTPUT>#cfdist#</CFOUTPUT>
</PRE>
</BODY>
</HTML>
