By using this site you agree to the use of cookies.

Learn more

Share via:

AutoIt FileRead Function

The FileRead function is used in combination with FileOpen to read files.

Edited: 2017-03-26 15:23

The AutoIt FileRead function can be used to read files.

If a filename is used instead of a file handle, the file will be opened and closed doing function call. This will be slower than using file handles when parsing larger files, so it might be better to use file handles.


filenameHandle of previously opened file.
count optionalThe number of characters to read. Reads the entire file by default.

AutoIt FileRead Example

$file = FileOpen("test.txt", 0)

    $FileContent = FileRead($file)
    MsgBox(0, "Content:", $FileContent)