User Tools

Site Tools


Sidebar

file:writefile

.writeFile()

Method to write a string to a file. This function can create new files. Existing files will be overwritten. You can also use the method .content().

Note: This method is different from the default ExtendScript method write().

Usage

var content = "String to insert into file";
var file = new File("C:/myfile.txt");
file.writeFile(content);

Parameters

Parameter Data type Required Description
content string The string to write to the file
encoding string The encoding to write the file. When not specified the default encoding UTF-8 is used.

Return Values

This method has no return values.

file/writefile.txt · Last modified: 2017/05/20 14:41 (external edit)