Example of Renaming a File
The following code renames the source file with the name specified with the destination attribute.
source="C:\docs\accessLog.txt"
destination="C:\docs\oldAccessLog.txt">
To append a file, you simply use action="append" (instead of action="write").
The contents you specify in this tag are appended to the end of the existing file.If the file doesn't already exist, it is created.
Example of Appending a File
This example declares a variable, assigns the current date and time to it, then appends the result to a file.
file="C:\docs\accessLog.txt"
output="#dateAccessed#">
Source : http://www.quackit.com/coldfusion/tutorial/coldfusion_append_file.cfm
No comments:
Post a Comment