Saving Files

squaremation

Active Member
Licensed User
Longtime User
Wondering if anyone has any idea how to do this? It's for a Camera App been trying to work this out for a week

I have looked at the documentation on files. I have got a specific folder for the apps pics, but i cant seem to figure out a way to write a loop that would check the file name then assign one?

B4X:
If File.Exists (File.DirRootExternal, "MyFolderl/001.jpg")
' not sure how to get a value out of /001 or return one

I think if i can figure out how to get /001.jpg to a variable and then once the variable is checked return it, i could write the code. I'm missing something and just getting syntax errors.

:sign0104:
 

rfresh

Well-Known Member
Licensed User
Longtime User
How about this:

B4X:
Dim mFilename As String
mFilename = "001.jpg"
If File.Exists (File.DirRootExternal, "MyFolderl/" + mFilename) Then
   
End If
 
Upvote 0

DouglasNYoung

Active Member
Licensed User
Longtime User
squaremation,
perhaps you should hold a variable which is saved between sessions for the last picture used - the it would be a simple task to increment this variable and save the file!

Cheers,
Douglas
 
Upvote 0
Top