volvomann Active Member Licensed User Longtime User May 2, 2012 #1 How can I test if a directory exsist when the app is starting, and if not create it? Last edited: May 2, 2012
mc73 Well-Known Member Licensed User Longtime User May 2, 2012 #2 I think you can use file.mkdir, without worrying whether the directory to be created exists or not. Files - Basic4android Wiki And you can check whether a file is directory by using: IsDirectory (Dir As String, FileName As String) As Boolean Upvote 0
I think you can use file.mkdir, without worrying whether the directory to be created exists or not. Files - Basic4android Wiki And you can check whether a file is directory by using: IsDirectory (Dir As String, FileName As String) As Boolean
volvomann Active Member Licensed User Longtime User May 2, 2012 #3 mc73 said: I think you can use file.mkdir, without worrying whether the directory to be created exists or not. Files - Basic4android Wiki And you can check whether a file is directory by using: IsDirectory (Dir As String, FileName As String) As Boolean Click to expand... Thank you but i used this code and it works great: B4X: File.MakeDir(File.DirRootExternal, "memoBackup") MyPath = File.DirRootExternal & "/memoBackup/" If File.Exists(MyPath, "") = False Then Msgbox("False","") Else Msgbox("True","") End If Upvote 0
mc73 said: I think you can use file.mkdir, without worrying whether the directory to be created exists or not. Files - Basic4android Wiki And you can check whether a file is directory by using: IsDirectory (Dir As String, FileName As String) As Boolean Click to expand... Thank you but i used this code and it works great: B4X: File.MakeDir(File.DirRootExternal, "memoBackup") MyPath = File.DirRootExternal & "/memoBackup/" If File.Exists(MyPath, "") = False Then Msgbox("False","") Else Msgbox("True","") End If