Could you guys test this to see if I haven't messed anything up. It now uses the native FileReadToArray() instead of FileRead() and a regular expression. #include <FileConstants.au3> Local $hFileOpen = FileOpen('Test.txt', $FO_OVERWRITE) For $i = 1 To 100 FileWriteLine($hFileOpen, $i) Next FileClose($hFileOpen) _FileWriteToLine('Test.txt', 10, 'Line_10', 1) ConsoleWrite(@error & @CRLF) ; #FUNCTION# =================================================================================