"Write" Function

Top  Previous  Next

Writes the given string expression to the specified file. If the target file does not exists it is created. If it does either it is overwritten or appended.

Syntax:

Write(file-name, string-expression [, append, charset] )

 

Parameters

file-name

The name of the target file

string-expression

The string expression to write

append

Optional parameter. When true is specified as value and if the target file already exists, the string expression is appended to the file.

charset
...
 

See Absolute or Relative Names.

 

Examples:

@// Append the 'New user created' text to the {APPLICATION_ROOT}\WEB-INF\log.txt file.

Write('WEB-INF/log.txt','New user created',true) 

 

@// Write the content of the pool variable "XML" to the C:\orders\0012.xml file.

Write('C:\orders\0012.xml', v:XML)

 

@// {C:\musteriler\0516.xml dosyasına v:musteri değişkeni içindeki metni UTF-8 karakter seti ile yaz.

Write('C:\musteriler\0516.xml', v:musteri, false, 'UTF-8')