Question on opening file with uppercase letter

chowjt

Member
Licensed User
Longtime User
Hi All,

I have problem opening a uppercase letter filename. Z2.xml
It works fine if I rename both the filename and the varaible in the script into lower case, z2.xml

Not Working (with filename Z2.xml):
QxmlString = "Z2"
In = File.OpenInput(File.DirAssets, QxmlString & ".xml")

Working (with filename z2.xml):
QxmlString = "z2"
In = File.OpenInput(File.DirAssets, QxmlString & ".xml")

Thank you all for your help.

Cheers,
James
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Android file system is case sensitive. The files added to the Files tab are lowercased automatically. When you open a file from the assets folder the name is also lowercased automatically.

I guess that you copied the file manually and not through the Files tab. In that case you should make sure that the file name is lowercase.
 
Upvote 0

chowjt

Member
Licensed User
Longtime User
Thanks Erel for the quick reply.

In my case, all the uppercase files are put in the B4A project for compiling. I guess that the files are copied by the compiler. It looks like the the script changes everything in lower case automatically while the Filename were kept in uppercase.

If there is no quick solution on this, I will convert all the files into lower case to B4A folders for the compiling.

Thanks for the help.

Cheers,
James
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…