Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to convert line endings in text files?
Answer: You can simply read file with TextInputStream and write with new line endings using TextOutputStream class.
dim inputfile as FolderItem = SpecialFolder.Desktop.Child("test.txt")
dim outputfile as FolderItem = SpecialFolder.Desktop.Child("output.txt")
dim it as TextInputStream = TextInputStream.Open(inputfile)
dim ot as TextOutputStream = TextOutputStream.Create(outputfile)

ot.Delimiter = EndOfLine.Windows // new line ending
while not it.EOF
ot.WriteLine it.ReadLine
Notes: TextInputStream will read any input line endings and with delimiter property in TextOutputStream you can easily define your new delimiter.

Feedback, Comments & Corrections

The biggest plugin in space...

MBS FileMaker Plugins