procedure StringToFile(Str, Filename: string);

 

This function dumps a string to a (text) file. If the destination file doesn't exist it will be created, if it already exists it will be completely overwritten with the new contents. If you only want to append a string to a file instead of overwriting it, please, check out the AppendStringToFile method.

 

Parameters

Str

The string to be written into the file

FileName

The text file to which the string will be written to