My app saves a bunch of stuff to an XML file. This is my line of code-

Using writer As XmlWriter = XmlWriter.Create("C:\vdx2k\MWS\RE\EXTReportsInbox\TK" & frmCitation.txtCiteNumber.Text & "Traff.xml", settings)

So that saves it at that specific location.

I need to duplicate the XML and have it also save in another location. I've been at this for days, Googling, searching, trying different things and now I need to turn here for help.

Any ideas?

  1. Use File.Copy to copy the XML file you just created.
  2. Open two XmlWriter in your Using block and duplicate the part where you actually write.
  3. Make your code a method taking a path/filename and call it twice.

Thanks for the quick reply Momerath. I got it to work with your suggestion, thanks!