File_Read (filehandle [, optionalCount])

Result Type:  string

Definition:  Returns a string containing either the entire contents of the file (from the current mark), or the requested byte count from the mark.


let fd = File_Open("a file in the MoneyWorks Automation dir.txt")
if fd <> NULL
    let content = File_read(fd) // read the entire file

Availability:  available within MWScript handlers.

See Also:

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_ReadLine: Read to end of line from current position

File_SetMark: Set Current read/write position

File_Write: Write text at current position

WriteToTempFile: Create a temp file containing the string