FilePut

Writes a string to a file.

Syntax:

FilePut(filename, string)

Parameters:

(s) filename name of the file to write to.

(s) string string to write to the file.

Returns:

(i)  number of bytes written to the file.

 

If "filename" exists, it will be overwritten.

Windows Vista/2008 and newer: This function may require an Administrator level account if dealing with files located in a protected directories: 'Program Files' and 'Windows'.

This function supports extended-length path names.

Example:


filename = "c:\temp\readme.txt"
str = "Hello World"
data = FilePut(filename , str)
Message("Done", "Writing string to file")
Exit
See Also:

IntControl 40, FileGet, FilePutW, FileWrite