It will be very helpful if I can create a folder under the root of SD card. I search around the forum, It seems that until now, it still cannot create a folder under the root of SD card. Am I right?
If I want to create a new folder named NailFans, how do I code the new_folder.
Dim Sqlname3 As String="Mydesign.sqlite3"
Dim new_folder As String="root\NailFans" ' <------ I don't know how to define new_folder
OpenSQLitefile(Sqlname3)
File.MakeDir(File.DirRootExternal,"new_folder") ' <----- the statement is put here?
SQL3.Initialize(File.DirRootExternal, Sqlname3, True)
Sorry, I have to explain again.
I define fileDir = "D:\test"
B4X:
Sub OpenSQLitefile(SN As String)
File.MakeDir(File.DirRootExternal, fileDir) 'To define a External root Dir here is very important
If File.Exists(File.DirRootExternal, SN) = False Then
File.Copy(File.DirAssets, SN, File.DirRootExternal, SN)
End If
End Sub
[\code]
No data file being put into D:\test
All files are in the root
Andy
Sub OpenSQLitefile(SN As String)
File.MakeDir(File.DirRootExternal, "\NailFans") 'To define a External root Dir here is very important
If File.Exists(File.DirRootExternal, SN) = False Then
File.Copy(File.DirAssets, SN, File.DirRootExternal&"\NailFans", SN)
End If
End Sub
[code\]
An folder has been created successfully. But there is no file inside the folder. The file still located in root.
Andy
Sub OpenSQLitefile(SN As String)
File.MakeDir(File.DirRootExternal, "\NailFans") 'To define a External root Dir here is very important
If File.Exists(File.DirRootExternal & "/\NailFans", SN) = False Then
File.Copy(File.DirAssets, SN, File.DirRootExternal & "/\NailFans", SN)
End If
End Sub
Dear Mahares,
I works. I feel so happy for I can have this very important function.
Thank you so much. And Thanks a lot to sorex and Manfred for your enthusiastic and prompt answers.
Andy