Hello :), I wanna insert a backspace in a file (Sorry, I don't know what to say formally) I tried this: #include <Array.au3>
Func FileBackspace($sFile, $iLine, $iCount) ; Pretty straight forward name, isn't it?
$hFile = FileOpen($sFile, 2) ; Open file in over-write mode
$aFile = FileReadToArray($hFile) ; File to array
$aFile[$iLine] = StringTrimRight($aFile[$iLine], $iCount) ; Trim the line (NOTE: Backspace means trim starting from right)
$sFile = _ArrayToString($aFile, @CRLF) ; Store new modifed file in a variable
FileWrite($hFile, $hFile) ; Hmmmm... What would FileWrite do?
EndFuncThis is not the best way to do this. This will be OK for small files but for files with size of 1 GB!!! I tried hard but I failed to insert backspace without storing the entire file in the RAM I want a function which does this but without storing the entire file Thanks in advance, TD