C cjolly Member Licensed User Longtime User May 10, 2012 #1 Hi, I need to create a file if it not exists, but if exists and so there are records that I can open and add new data (records). Sorry for the basics of the question but I'm new with b4a and the understanding of some points is costing. TIA
Hi, I need to create a file if it not exists, but if exists and so there are records that I can open and add new data (records). Sorry for the basics of the question but I'm new with b4a and the understanding of some points is costing. TIA
NJDude Expert Licensed User Longtime User May 10, 2012 #2 You can get some samples HERE and the documentation for FILES is HERE Upvote 0
Theera Expert Licensed User Longtime User May 10, 2012 #3 Dim NewLine As String NewLine="ABC" Dim Writer As TextWriter If File.Exists(File.DirDefaultExternal,"File1.txt")=False Then Writer.Initialize(File.OpenOutput(File.DirDefaultExternal,"File1.txt",True)) Writer.WriteLine(NewLine) Writer.Close End If Upvote 0
Dim NewLine As String NewLine="ABC" Dim Writer As TextWriter If File.Exists(File.DirDefaultExternal,"File1.txt")=False Then Writer.Initialize(File.OpenOutput(File.DirDefaultExternal,"File1.txt",True)) Writer.WriteLine(NewLine) Writer.Close End If