标签:
static void Main(string[] args)
{
string scoure = @"C:\Documents and Settings\Administrator\桌面\数据库函数.avi";
string target="D:\\1.avi";
move(scoure, target);
Console.ReadKey();
}
public static void move(string scoure, string target)
{
using(FileStream red=new FileStream(scoure,FileMode.OpenOrCreate,FileAccess.Read))
{
using (FileStream wir = new FileStream(target, FileMode.OpenOrCreate, FileAccess.Write))
{
byte[] b = new byte[1024 * 1024 * 5];
while (true)
{
int r = red.Read(b, 0, b.Length);
if (r == 0) break;
wir.Write(b,0,r);
}
}
}
}
标签:
原文地址:http://www.cnblogs.com/mengluo/p/4932427.html