Document

  • Thread starter Thread starter samoore33
  • Start date Start date
S

samoore33

Is there a way to check and see if a document exists when an app loads?
The first time the user starts the app, I want it to check and see if
an XML document exists, which it shouldn't. Therefore it will write out
the xml document needed for the app.

Thanks
 
samoore33 napisal(a):
Is there a way to check and see if a document exists when an app loads?
The first time the user starts the app, I want it to check and see if
an XML document exists, which it shouldn't. Therefore it will write out
the xml document needed for the app.

Thanks

Hi samoore33,

You can do ity like that:


Dim DocPath As String = "C:\1.xml"
Dim XMlFile As New FileInfo(DocPath)

If XMlFile.Exists = True Then
MessageBox.Show("Exists")
End If

You have to import System.IO namespace

Hope this helps.

Regards,
sweet_dreams
 
samoore33 said:
Is there a way to check and see if a document exists when an app loads?
The first time the user starts the app, I want it to check and see if
an XML document exists, which it shouldn't. Therefore it will write out
the xml document needed for the app.

'System.IO.File.Exists'.
 
Back
Top