padvou Active Member Licensed User Longtime User Oct 9, 2013 #1 What is wrong with this code: Code: If File.Exists(File.DirRootExternal , "parentdir/subdir1")=False Then File.MakeDir(File.DirRootExternal , "parentdir/subdir1")
What is wrong with this code: Code: If File.Exists(File.DirRootExternal , "parentdir/subdir1")=False Then File.MakeDir(File.DirRootExternal , "parentdir/subdir1")
Erel B4X founder Staff member Licensed User Longtime User Oct 9, 2013 #2 What is the error message? Upvote 0
eps Expert Licensed User Longtime User Oct 9, 2013 #3 Will File Exists work with subfolders? http://www.b4x.com/android/forum/threads/my-directory-in-directory-files.22159/#post-128564 Upvote 0
Will File Exists work with subfolders? http://www.b4x.com/android/forum/threads/my-directory-in-directory-files.22159/#post-128564
padvou Active Member Licensed User Longtime User Oct 9, 2013 #4 Erel said: What is the error message? Click to expand... It never creates the directory, no error. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 9, 2013 #5 File.Exists works with subdirectories. I've tried your code and it works fine here. Maybe the external storage is read-only? You can check it with File.ExternalWritable. Upvote 0
File.Exists works with subdirectories. I've tried your code and it works fine here. Maybe the external storage is read-only? You can check it with File.ExternalWritable.
padvou Active Member Licensed User Longtime User Oct 9, 2013 #6 No it's not read-only. A couple of lines above the code snippet I posted, it creates other directories without issues. I use the exact same code in other applications and it works fine.. Upvote 0
No it's not read-only. A couple of lines above the code snippet I posted, it creates other directories without issues. I use the exact same code in other applications and it works fine..
Erel B4X founder Staff member Licensed User Longtime User Oct 9, 2013 #7 You can add another File.Exists to check whether the folder was created successfully. If not then is something wrong. Maybe with the sd card file system. Upvote 0
You can add another File.Exists to check whether the folder was created successfully. If not then is something wrong. Maybe with the sd card file system.
padvou Active Member Licensed User Longtime User Oct 9, 2013 #8 Thank you. I'll do some more tests.. Upvote 0