Author Topic: Is it possible to append text to a file?  (Read 879 times)

ajax

  • Junior Member
  • **
  • Posts: 20
    • View Profile
Is it possible to append text to a file?
« 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.

Jean

  • Contributor
  • Active Member
  • *****
  • Posts: 45
    • View Profile
Re: Is it possible to append text to a file?
« Reply #1 on: April 25, 2020, 13:11:45 »
maybe addarray / savearray / loadarray?

Mathias (Author)

  • Administrator
  • Elite Member
  • *****
  • Posts: 3585
    • View Profile
    • Multi Commander
Re: Is it possible to append text to a file?
« Reply #2 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.