Adobe ColdFusion 8

FileWriteLine

Description

Appends the specified text to the file object.

Category

System functions

Function syntax

FileWriteLine(fileobj, text)

See also

FileCopy, FileDelete, FileExists, FileMove, FileWrite, cffile

History

ColdFusion 8: Added this function.

Parameters

Parameter

Description

text

Content to add to the file object.

fileobj

Pathname of the file to write.

If not an absolute path (starting a with a drive letter and a colon, or a forward or backward slash), it is relative to the ColdFusion temporary directory, which is returned by the GetTempDirectory function.

Example

<h3>FileWriteLine Example</h3>

<cfscript> 
    myfile = FileOpen("c:\temp\test1.txt", "read");
    FileWriteLine(myfile,"this line is new");
    FileWrite("c:\temp\mail_list.txt", "#myfile#");
    FileClose(myfile);
</cfscript>