1
Reply

Coping files to a directory

Tito Onowu

Tito Onowu

Nov 4 2013 2:45 PM
964
Good evening teachers. Could you please tell me why i can't copy two or more files to this directory. Thanks again for your relentless eye opener.
 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();

Answers (1)