Snippets
Here is your code snippet
move a file with MoveTomove a file with MoveTo
using System;
using System.IO;
namespace csharp
{
class Class1
{
static void Main(string[] args)
{
FileInfo fileInfo = new FileInfo(@"d:\testfile1.txt");
if (File.Exists(@"d:\testfile1.txt "))
{
fileInfo.MoveTo(@"e:\test1.txt ");
Console.WriteLine("Success");
}
}
}
}