|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DocumentIs 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? Hi samoore33,> 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 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 Sweet,
Thanks a lot, I appreciate the help. samoore33 sweet_dreams wrote: Show quoteHide quote > 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" <samoor***@gmail.com> schrieb: 'System.IO.File.Exists'.> 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. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Parsing between a character and sysmbol
Best Practice Error Handling Programmatically Crawl a DLL's Namespacec A little help with an array & 'NullReferenceException was unhandled' ?? Is there a repeat characters function? VB 2005 Syntax A windows service question Data Binding with CSV Files String function in VB vb.net richtextbox selectionstart coloring |
|||||||||||||||||||||||