Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
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