info.mailtraq.com > Management > Script Functions A-Z > AppendFile() AppendFile()Opens a file for writing. If the specified file exists, the file pointer is positioned at the end of the current content. If the specified file doesn't exist, it is created. Although Mailtraq closes any files which are open when a script terminates, file handles should be released explicitly by the script using the CloseFile() function.
handle := AppendFile( path )
- path
- Identifies the file to be created by its filing system name. If no path is quoted Mailtraq assumes the folder \database
- handle
- The handle is used in subsequent references to the opened file. The handle is null if the specified file cannot be opened.
//Example of usage
myfile:= AppendFile("d:\internet\resource\sig-joe.txt");
Write(myfile, "\n-- \nMailtraq Website http://www.fastraq.co.uk ");
CloseFile(myfile) |