Tito Onowu

Tito Onowu

  • NA
  • 37
  • 8.9k

coping file from one path to another

Nov 4 2013 5:44 AM
Hello teachers and friends. I was trying to copy a file from my desk top to a location on my computer but got an error. The given path format is not supported.
Thanks.

FileInfo sm = new FileInfo(@"C:\Users\Totiruzi\Desktop\English to Russian.txt");
            sm.CopyTo(Environment.GetFolderPath(Environment.SpecialFolder.SendTo)+@"G:\English to Russian.txt");
            Console.WriteLine("Has English to Russian been copied to G?");
            Console.ReadKey();

Answers (4)