Multi Commander Support Forum

Multi Commander => Script => Topic started by: ajax on April 13, 2020, 17:47:12

Title: Is it possible to append text to a file?
Post by: ajax on April 13, 2020, 17:47:12
I can use the echo command to append text to a file but thought such a script would be cleaner if I could do it using something like the "SaveStringToFile" command.  However, it seems "SaveStringToFile" does NOT allow text to be appended to a file.  This seems like a very normal/natural thing to do.  Given how sophisticated the Multicommander scripting capability is it would be surprising to find this can NOT be done.

I'm thinking that first using "LoadStringFromFile" and then appending to that string before running "SaveStringToFile" might work but this could become unwieldy as the size of the file grows and I'd opt to stick with echo.

I hoping someone can clue me in about what I've failed to figure out.
Title: Re: Is it possible to append text to a file?
Post by: Jean on April 25, 2020, 13:11:45
maybe addarray / savearray / loadarray?
Title: Re: Is it possible to append text to a file?
Post by: Mathias (Author) on May 21, 2020, 15:57:46
In the next verison the function SaveStringToFile(...) will support an extra parameter. and you can select to append to file.