using System;
using System.Runtime.InteropServices;
namespace ConsoleApplication1
{
class Program
{
[DllImport("kernel32.dll")]
static extern bool MoveFile(string lpExistingFile,string lpNewFileName);
static void Main(string[] args)
{
string srcFileName=@"c:\1.txt";
string dstFileName=@"d:\d.txt";
if(MoveFile(srcFileName,dstFileName)==true)
{
Console.WriteLine("OK");
}
else
{
Console.WriteLine("Fail!");
}
}
}
}