Directory.exists always FALSE

  • Thread starter Thread starter Roger Odermatt
  • Start date Start date
R

Roger Odermatt

Hello

I have the follow code in my app.

---------------
If System.IO.Directory.Exists(App.Path & "\settings.xml") = True then
....
else
....
End if
---------------

The file exists, but i have always FALSE, why that?

Thank you very much

regrads
Roger
 
Because you're asking it if a Directory exists with a file. A file is not a
directory. If you want to see if a file exists, use File.Exists.
 
Back
Top