Result Type: string
Definition: Reads and returns a string containing one line of the file from the current mark up to the next \n, \r or \r\n. The string contains the line ending character, but if the line ending is \r\n the trailing \n is excluded and you will only get the \r.
At the end of the file, the return value will be an empty string (an empty line in the file would return wiht the newline)
let fd = File_Open("a file in the MoneyWorks Automation dir.txt") if fd <> NULL while true let line = File_Readline(fd) if line == "" break endif syslog(line) endwhile File_Close(fd) endif
Availability: available within MWScript handlers.
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_SetMark: Set Current read/write position
File_Write: Write text at current position
WriteToTempFile: Create a temp file containing the string