DirectoryInfo myDr = new DirectoryInfo(@"G:\Elias");
if (!myDr.Exists)
{
myDr.Create();
}
FileInfo myF1 = new FileInfo(@"G:\test9.txt");
myF1.CopyTo(myDr.FullName + (@"\tet9.txt" + @"\test.xml"));
//myDr.Delete(true );
Console.ReadKey();
VulpesPosted Nov 4, 2013, 6:08 PM
You therefore need to create a separate FileInfo object file the second file:
FileInfo myF1 = new FileInfo(@"G:\test9.txt");
myF1.CopyTo(myDr.FullName + @"\test9.txt");
FileInfo myF2 = new FileInfo(@"G:\test.xml");
myF2.CopyTo(myDr.FullName + @"\test.xml");