Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 

 

WRITEFILE

Writes a string to a file.

Syntax

Parameters

STR (required)
String to write to a file

FILE (required)
Name of the file to write.

Description

The WRITEFILE tag writes a string to a file. The file path you specify must be legal; subfolders are created as needed. The syntax must be specific to your operating system.

errno

The possible values of errno include:

Value
Description
-301
File was not written.

Example

The following example writes the value of Variables.junk to the Windows NT file, foo.bar, in the temp directory.

You should create a property in the Content Server properties file that contains system-dependent file path syntax and append the file name to the property to construct the full path.

For example, you if you specify the folder location property as:

The example code to write the value of Variables.junk to the folder foo.bar is:

See Also

DELETEFILE

  Home > Contents > Index >

FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.