C#利用VB的My功能来显示文件拷贝、删除、移动进度
直接上代码:(简单)
郁闷,我的博客出了BUG。
using Microsoft.VisualBasic.FileIO;
class ProgressBarCopy {
static void Main() {
string copySrc = @"C:\WINDOWS\Microsoft.NET";
string copyDest = @"C:\TipsTmp";
FileSystem.CopyDirectory(
copySrc, copyDest, UIOption.AllDialogs);
string moveDest = @"C:\TipsTmp2";
FileSystem.MoveDirectory(
copyDest, moveDest, UIOption.AllDialogs);
FileSystem.DeleteDirectory(
moveDest, UIOption.AllDialogs,
RecycleOption.SendToRecycleBin);
}
}
哈哈,其实我还写了一个C#的My类,就不拿出来献丑了。 class ProgressBarCopy {
static void Main() {
string copySrc = @"C:\WINDOWS\Microsoft.NET";
string copyDest = @"C:\TipsTmp";
FileSystem.CopyDirectory(
copySrc, copyDest, UIOption.AllDialogs);
string moveDest = @"C:\TipsTmp2";
FileSystem.MoveDirectory(
copyDest, moveDest, UIOption.AllDialogs);
FileSystem.DeleteDirectory(
moveDest, UIOption.AllDialogs,
RecycleOption.SendToRecycleBin);
}
}
郁闷,我的博客出了BUG。