Write

Description

Writes a file.

Syntax

target.file.Write( filename, data, [hint] )

filename  - the file name the data will be written to

data - either a string or a stream

hint (optional) - string with options

The optional hint string could contain the following string (separation is not important):

    "text" - if the data contains new line characters they will be replaced to CR/LF sequence.

    "append" - if the output file exists the the data being written will be appended.

    "encoding" - convert the Unicode string to default system encoding

    "encoding=windows-1252" or "charset=windows-1252" - convert the Unicode string to a specified encoding, such as windows-1252

        Supported charsets:

            windows-1252

            windows-1251

            iso-8859-1

            utf-8

Return value

This function does not return a value.

Sample

'---------- Start ----------

Function Start

target.file.Write "C:\FileTestFolder\FileWriteSample.txt", "Write Method Sample"

End Function

See also

Platform Objects and Methods

target.file.Unzip

target.file.Zip

target.file