CFFILE ACTION="Append"  
 
 

Use CFFILE with the Append action to append additional text to the end of an existing text file, for example, when creating log files.

 
 
  Syntax  
 
<CFFILE ACTION="Append"
    FILE="file_name"
    OUTPUT="string"
    ATTRIBUTES="file_attributes">

FILE

Required. The file to which the content of the OUTPUT attribute is appended (with directory location).

OUTPUT

Required. The string to be appended to the file designated in the DESTINATION attribute.

ATTRIBUTES

Optional. A comma-delimited list of file attributes to be set on the file being appended. The following file attributes are supported:

  • ReadOnly
  • Temporary
  • Archive
  • Hidden
  • System
  • Normal

If ATTRIBUTES is not used, the file's attributes are maintained. If Normal is specified as well as any other attributes, Normal is overridden by whatever other attribute is specified.

Individual attributes must be specified explicitly. For example, if you specify just the ReadOnly attribute, all other existing attributes are overwritten.

 
 
  Example  
 

The following example appends the text string "But Davis Square is the place to be." to the file fieldwork.txt which was created in the previous example:

<CFFILE ACTION="Append"  
    FILE="c:\files\updates\fieldwork.txt" 
    OUTPUT="<B>But Davis Square is the place to be.</B>">



 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.