Sub AddStringToFile($fileName As String, $s As String) As Boolean


Adds the string $s, followed by a carriage return and linefeed, to the file specified by $fileName.


If the string cannot be added, AddStringToFile returns FALSE.


Parameters


  • $fileName ... String expression that specifies the absolute path and file name.
  • $s ... String expression that contains the content to be added to the file.


Example:

Dim $s

$s = "feature executed successfully"
AddStringToFile("c:\mydocs\log.txt", $s)