Edit

File_Write (filehandle, string)

Result Type:  number (system error code)

Definition:  Writes the string to the file at the current mark. Return value is zero if successful.

Example: 

let fd = File_Open("a file.txt", "w") // creates in ~/Desktop/MoneyWorks Automation/
if fd <> NULL
    File_Write(fd, "my text")
    File_Close(fd)
endif

Availability:  available within MWScript handlers.

See Also:

AddSafePath: UI to add a safe path to the preferences

CreateFolder: Create a new folder

File_Close: File functions for creating/reading/writing text files

File_GetLength: File length in bytes

File_GetMark: Get current read/write position

File_Move: Rename/move a file

File_Open: Open a file

File_Path: Get the full path of an open file

File_Read: Read text from current position

File_ReadLine: Read to end of line from current position

File_SetMark: Set Current read/write position

WriteToTempFile: Create a temp file containing the string