IO File.copy 实现文件的复制
如图:
代码如下:
View Code
string path = @"c:\temp\MyTest.txt";
string pathCopy = @"c:\temp\MyTestCopy.txt";
if (File.Exists(path))
{
File.Copy(path, pathCopy, true);
File.Delete(path);
}
string pathCopy = @"c:\temp\MyTestCopy.txt";
if (File.Exists(path))
{
File.Copy(path, pathCopy, true);
File.Delete(path);
}