Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Appends a text file with the given text.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Text | 2.8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
(old name: String.AppendTextFile)
Parameter | Description | Example | Flags |
---|---|---|---|
Text | The text to save. | "Hello World" | |
FilePath | The native file path. Something like "/Users/cs/desktop/test.txt" on Mac and "C:\Programs\Data\test.txt" on Windows. Files without path end in the root directory on Mac. | "test.txt" | |
encoding | The text encoding for text parameter. Default is native. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
"UTF-8" | Optional |
Returns "OK" or an error message.
Write UTF-8 file with some text:
MBS("Text.AppendTextFile"; $Text; $Path; "utf8" )
Write a test text file:
MBS("Text.AppendTextFile"; "Hello World. Some umlauts: äöü"; "/Users/cs/Desktop/testfile.txt"; "native")
This function is free to use.
Created 18th August 2014, last changed 4th August 2023