How can I append text to a file?
You can use the SaveStringToFile()
function to append text to a file.
fileName := ExpandConstant('{pf}\{#MyAppName}\batch.bat');
SetArrayLength(lines, 3);
lines[0] := 'echo hello';
lines[1] := 'pause';
lines[2] := 'exit';
Result := SaveStringsToFile(filename,lines,true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With