Android Question Access a file in the Download Folder

bocker77

Active Member
Licensed User
Longtime User
I connect my tablet to my PC using a USB cable and place a file into it. Now I want to access that file. I read this http://stackoverflow.com/questions/18383055/android-where-are-downloaded-files-saved on the net but cannot convert the java code to basic4android. I also seen some threads on this forum on how to access this folder but I can't get to the file. Here is my last iteration of code.

If File.Exists(File.Combine(File.DirRootExternal, "Download"), "Miniature Inventory.csv") Then
Msgbox("I am here","")
Else
Msgbox("File does not exist in the Download directory", "Battling Napoleon")
End If

I always wind up in the second Msgbox.

I also want to copy the file to File.DirInternalCache

Thanks in advance for any help.
 

bocker77

Active Member
Licensed User
Longtime User
upload_2014-2-19_16-50-53.png
 
Upvote 0

bocker77

Active Member
Licensed User
Longtime User
Through IO File Manager on the tablet I can deduce that the path is /mnt/sdcard/Download/. So I try that and file://mnt/sdcard/Download/ and replace Download with download. I assume that since the underlying OS is Linux that it is case sensitive. I have no idea what to use. Stumped!
 
Upvote 0

bocker77

Active Member
Licensed User
Longtime User
I got it to work with this.
File.DirRootExternal & "/Download/", "miniaturesinventory.csv"

I found one of your posts which you told someone to do this.
Msgbox(File.DirRootExternal, "")

So I did it and in the IO Manager I traversed down the path and found my file. I also played around with the file name and am going to re-transmit it from the PC and see if it still works. I will use this new file name for my file.
 
Upvote 0
Top