File Location

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Working with emulator, (for now) I am reading a file that I previously saved in FileDirAssets. I see that it corresponds to "Files" folder inside the particular project folder. I would like to write a new one (a txt file), derived from the first file. My purpose is to examine this latter by other programs. If I try to write to DirAssets, with a TextWriter, I get something like a "file doesn't exist exception" and I argue that I cannot write there, because otherwise such message has no sense during writing. Moreover everything seem to work using DirRootExternal, for example. My problem is that I don't know where DirRootExternal or DirDefaultExternal physically are.. My emulator was created with SD card. I guess DirRootExternal could be "there". But where in my machine? Or they don't exists after program execution? If so, how to have a file that survives to b4a program execution?
Thanks
 

sarkis

Member
Licensed User
Longtime User
Hi,
I 'v had same questions before.
Look at post
"trouble with file location" on my name
(I don't know how get a link)
and I think you should understand .
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Attached you find a Word file on how to exchange files between the PC and an Emulator using the Dalvik Debug Manager.
It's the chapter that will be added in the next update of the Beginner's Guide.

Best regards.
 

Attachments

  • Exchanging files with the PC.zip
    373.6 KB · Views: 301
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Attached you find a Word file on how to exchange files between the PC and an Emulator using the Dalvik Debug Manager.
It's the chapter that will be added in the next update of the Beginner's Guide.

Best regards.

Hi Klaus,
I have disturb you about my code in Activity_create(FirstTime as Boolean) is
If File.Exists(File.DirDefaultExternal,"RiceName1.txt")=False Then
File.CopyFile.DirAssets,"RiceName.txt",File.DirDefaultExternal,"RiceName1.txt")
End If
When I run in Emulator is OK. but whenever I run on chinese android tablet ,it must copyfile (File.Exists(File.DirDefaultExternal,"RiceName1.txt")=True ??)

May I can send my app direct to you on private E-mail?

Best Regards
Theera
baanrai.riceseeds@hotmail.com
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…