Document

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • samoore33

    #1

    Document

    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

  • sweet_dreams

    #2
    Re: Document


    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(DocPat h)

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

    You have to import System.IO namespace

    Hope this helps.

    Regards,
    sweet_dreams

    Comment

    • samoore33

      #3
      Re: Document

      Sweet,

      Thanks a lot, I appreciate the help.

      samoore33

      sweet_dreams wrote:
      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(DocPat h)
      >
      If XMlFile.Exists = True Then
      MessageBox.Show ("Exists")
      End If
      >
      You have to import System.IO namespace
      >
      Hope this helps.
      >
      Regards,
      sweet_dreams

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Document

        "samoore33" <samoore33@gmai l.comschrieb:
        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'.

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

        Comment

        Working...