Android Question Read TXT file and delete it

santiago

Member
Licensed User
Longtime User
I need to read a txt file located in external directory DOWNLOAD, after read the file text I must delete it.

I can access the file using the EditText example . But I have the next questions :

a) How can read directly , using the filehandler class , feeding the directory and file name . Real directory and real file name
Something like LoadFile(directory,filename) load("...DOWNLOAD" ,"test,txt")
In Erel example I can see the file is retrived using a not real name and not real directory . Sorry !!!

Maybe , I the directory and file name find out when I degug EditText example its ALLWAYS the same maybe I can makeup a function to read the file ... I will try but I think the internal name will change with each test.txt file generated ¿?

b)After read , how can delete the file I just read ?

The proble its I am not able ,I did not find out the way , to read files in that diretory (exception to EditText example ) and less to delete in that directory.

Maybe would be a way using javaobject but I am lost here too . I can read,save and delete file from the external directory DOWNLOAD but outside my B4A app .

Maybe its a very simple question. Sorry .
Thanks for your time and sorry for my English
 
Top