Writing to a file

You can write text to a file using the write function. This function creates a file if a given file name does not exist.  See the following example:

<cfset cfclient.file.write(“myNewFile.txt”, “Hello World!!!”)>

Method summary

write(name, data) - write data to a given file

  • returns - None
  • params
    • name – Absolute or relative path of the file name (including file name)
    • data - data to be written to the file

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy