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();

VulpesRank #55 · 29.2K reputationPosted Nov 4, 2013, 1:16 AM EST
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Nov 4, 2013, 1:09 AM EST
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace IfExample
{
class CopyFile
{
static void Main()
{
string oldPath = @"C:\Users\Totiruzi\Desktop\English to Russian.txt";
string newpath = @"G:\";
string newFileName = "English to Russian.txt";
FileInfo f1 = new FileInfo(oldPath);
if (f1.Exists)
{
f1.CopyTo(string.Format("{0}{1}{2}", newpath, newFileName, f1.Extension));
}
Console.WriteLine("Has English to Russian been copied to G?");
Console.ReadKey();
}
}
}
Tito Onowu26 reputationPosted Nov 4, 2013, 1:19 AM EST
Tito Onowu26 reputationPosted Nov 4, 2013, 1:21 AM EST