By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

AutoIt FileRead Function

The FileRead Function of AutoIt is used to read files.

Edited: 2014-12-31 03:30

The FileRead function of AutoIt 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.

Parameters

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)

FileClose($file)