private void buttonSaveXML_Click(object sender, EventArgs e)
{
SaveFileDialog saveFile = new SaveFileDialog();
saveFile.Filter = "XML Files|*.xml";
saveFile.Title = "Save a Xml File";
saveFile.InitialDirectory = @"C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\fxo\NewVersion";
textBoxTargetFolder.Text = @"C:\Program Files (x86)\EdisonFactory\NetOffice";
saveFile.ShowDialog();
if (saveFile.FileName != "")
{
FileStream fs = (FileStream)saveFile.OpenFile();
dsVersions.WriteXml(fs);
}
string sourceFileFolder = @"C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\fxo\NewVersion";
string destinationFileFolder = @"C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\fxo\NewVersion";
bool overwrite = true;
File.Copy(sourceFileFolder, destinationFileFolder);
{
overwrite = true;
}
I got that much done but i don't know what i am missing. Any help? The button saves XMLs but it also needs to get files from the selected files and copy/paste them where the xml file saves. Also there is an exception on File.Copy(sourceFileFolder, destinationFileFolder);
How i need to copy is getting the path from one textbox and pasting it from a path into another textbox.