info.mailtraq.com > Management > Script Functions A-Z > CloseFile() CloseFile()Closes a file previously opened with OpenFile(), AppendFile() or CreateFile(). Once a file handle has been closed, the handle no longer has any meaning and should no longer be used. Mailtraq automatically closes any open files at the end of each script however it is good practice to explicitly close all opened files. Also, when a file is open, it cannot be deleted or emptied using CreateFile().
CloseFile( handle )
- handle
- The file identifier returned by a call to OpenFile(), AppendFile() or CreateFile()
//Example usage
myfile:= CreateFile("d:\internet\resource\sig-john.txt");
Write(myfile, "\n-- \nJohn Smith");
CloseFile(myfile) |