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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
BinaryFile.WriteText
Writes a text file with the given text.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| BinaryFile | 7.3 | Yes | Yes | Yes | Yes | Yes |
MBS( "BinaryFile.WriteText"; BinaryFileRef; Text { ; Encoding } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| BinaryFileRef | The reference number for the open file. | $FH | |
| Text | The text to write. | "Hello World" | |
| Encoding | The text encoding for text parameter. Default is UTF-8. 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 |
Result
Returns OK or error.
Description
Writes a text file with the given text.You have to decide which encoding to use (if not UTF-8). We support a few encodings, but we can add more if you need something special.
Please use Text.ReplaceNewline to define which line endings the file has.
If text encoding doesn't support given characters, they are converted to close match if possible or replaced by question marks.
You can pass UTF-16, UTF-16LE or UTF-16BE for encoding, too.
See also Text.WriteTextFile and Text.WriteToContainer.
Examples
Write Hello:
MBS( "BinaryFile.WriteText"; $fh; "Hello"; "UTF8")
See also
- BinaryFile.Append
- BinaryFile.Close
- BinaryFile.Create
- BinaryFile.ReadText
- BinaryFile.WriteFloat
- BinaryFile.WriteHex
- BinaryFile.WriteInt
- Text.ReplaceNewline
- Text.WriteToContainer
- ZipFile.WriteText
Blog Entries
Created 12nd June 2017, last changed 12nd June 2017
BinaryFile.WriteInt - BlueThermProbe.ConnectToDevice
Feedback: Report problem or ask question.
Links
MBS FileMaker tutorial videos