Sorry for this stupid question, but i don't know why this code always shows the folder doesn't exists.
Edit because I solved it
Well this is the info for File.MakeDir (Info)
The correct command is...
And if you want to check if this directory exist, you can do
OR
Both are accepted.
I hope this will be usefull for B4A "newies" like me. And hope this info should be fixed.
Thanks for your help and sorry for my english
B4X:
Dim s As String
s = "todo"
If File.Exists(File.DirInternal & s & "/", "") = False Then
' Creamos la carpeta de descarga
File.MakeDir(File.DirInternal, s)
' Validamos
If File.Exists(File.DirInternal & s & "/", "") = False Then
Msgbox("Error", "")
Return
End If
End If
Edit because I solved it
Well this is the info for File.MakeDir (Info)
Well, this is not correct.MakeDir (Parent AsString, Dir AsString)
Creates the given folder (creates all folders as needed).
Example:
File.MakeDir(File.DirInternal, "music/90")
The correct command is...
B4X:
File.MakeDir(File.DirInternal, "/music")
And if you want to check if this directory exist, you can do
B4X:
If File.Exists(File.DirInternal "/music", "") = True Then
B4X:
If File.Exists(File.DirInternal "/music/", "") = True Then
I hope this will be usefull for B4A "newies" like me. And hope this info should be fixed.
Thanks for your help and sorry for my english
Last edited: