Getting text file into device system

jschuchert

Active Member
Licensed User
Longtime User
My app creates comma-delimited text files in a certain format, then uses them within the program. Say a user of my app already has that type of file and wants to import it into the app. He has copied it into the root directory of the device (or sd card in the device) from his computer. I need to know how to access it. So far I have used "DirInternal" for all of the files. The Home screen is where the files are opened in an edittext box where the filename is entered and a "txt" extension is added. Then the code is
B4X:
File.OpenOutput (File.DirInternal ,"temp.txt",True)
and opens that file.

Let's say he has copied "temp.txt" into the device's root system. Now what? What about the file on the sd card? What is the syntax of opening a file from there?

A problem I am having with my tablet is that I cannot find the file again on the device after copying it so it is difficult to monitor the process. I have a couple of file managers but they are little help.

Thanks in advance.

Jim
 
Top