P pbmjoe Member Licensed User Longtime User Feb 15, 2012 #1 Hi I have no doubt that this is a very simple Newbie problem. In B4A Designer I have used the Add Files feature to add a windows file Products.txt I assume that this would be an internal file However the following code gives an error "No such Directory or File" Dim Reader As TextReader Reader.Initialize(File.OpenInput(File.DirInternal,"Products.txt")) Dim line As String line = Reader.ReadLine Do While line <> Null Log(line) line = Reader.ReadLine Loop Reader.Close Can anyone save my sanity and provide a solution? Regards pbmjoe :sign0163:
Hi I have no doubt that this is a very simple Newbie problem. In B4A Designer I have used the Add Files feature to add a windows file Products.txt I assume that this would be an internal file However the following code gives an error "No such Directory or File" Dim Reader As TextReader Reader.Initialize(File.OpenInput(File.DirInternal,"Products.txt")) Dim line As String line = Reader.ReadLine Do While line <> Null Log(line) line = Reader.ReadLine Loop Reader.Close Can anyone save my sanity and provide a solution? Regards pbmjoe :sign0163:
stevel05 Expert Licensed User Longtime User Feb 15, 2012 #2 You should be able to find the file in File.DirAssets Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 16, 2012 #3 Note that you can read the whole file to a list of lines with File.ReadList. Upvote 0