B4J Question Write in file

haddad

Member
Licensed User
Longtime User
Hello
I want to write in a file but I always have the last text that replaces the first !
How could I do?

Help me plz
 

Harris

Expert
Licensed User
Longtime User
B4X:
    Dim TextWriter1 As TextWriter
    TextWriter1.Initialize(File.OpenOutput(File.DirRootExternal, "Test.txt", True))  ' set last param to true to append to the existing file...
    For i = 1 To 10
        TextWriter1.WriteLine("Line  " & i)
    Next
    TextWriter1.Close
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…