File_Close (filehandle)

Result Type:  no result

Definition:  Closes the file and releases the file handle. You should close file handles when you are finished with the file. If you fail to close a file, it will be closed automatically when the script is unloaded.


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_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

File_Write: Write text at current position

WriteToTempFile: Create a temp file containing the string