private void buttonCopiarArchivo_Click_1(object sender, EventArgs e)
{
System.Windows.Forms.FolderBrowserDialog d = new System.Windows.Forms.FolderBrowserDialog();
d.Reset();
d.Description = " Seleccionar una carpeta ";
DialogResult result = d.ShowDialog();
if (result == DialogResult.OK)
{
string sourceFile = this.filename_to_reproduce;
string destFile;
if (d.SelectedPath.Substring(d.SelectedPath.Length - 1, 1) == @"\")
{
destFile = d.SelectedPath + filename;
}
else
{
destFile = d.SelectedPath + @"\" + filename;
}
try
{
System.IO.File.Copy(sourceFile, destFile, true);
}
catch (Exception error)
{
MessageBox.Show(error.Message, "Error copiando archivo");
return;
}
MessageBox.Show("El archivo esta ubicado en: " + destFile, "Copia Exitosa");
}
}