File.[Location] error

JCO

Active Member
Licensed User
Longtime User
Hello,
I just started with B4A and find it really great. To start getting used to it, I'm following the tutorials and demos, and I have a problem when trying to run a piece of code from the file dialog sample; the line:

If File.Exists(File.[location], fd.ChosenName) = False Then

gives a compilation error:

Error parsing program.
Error description: Syntax error.
Occurred on line: 87
If File.Exists(File.[location], fd.ChosenName) = False Then

If I change "File.[location]" to, say, File.DirRootExternal, everything goes fine (except that the path is not correct :)

Any ideas of I maybe missing?

Thanks,
 
Last edited:

JCO

Active Member
Licensed User
Longtime User
Thanks for the quick response, Erel.
That was what I figured. My problem was, I got the FileDialog and file objects mixed up and was trying to find the location of the selected file in the file object instead of the FileDialog. :signOops:

I got it now, it was the .FilePath property I was looking for.
 
Upvote 0
Top